Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

BalfBlog now uses PDO

One of the biggest updates in terms of what it brings is the move from MySQLi to PDO - PHP's data objects for databases. Not only does PDO make it easier for me to add future database systems, it makes it easier for me to write the code.

MySQLi's biggest problem is the way in which prepared statements are formed:

$stmt -> bind_param("ss", $username, $password);

PDO solves this issue by making it possible for me generate any query and provide any number of parameters, thus allowing me to call the execute on the query at just one point. If you look through the new version BalfBlog you will understand why this is crucial.

Nothing will change on the front end, although the performance is much better with PDO because of the way it is written.

Posted in BalfBlog
php
pdo
balfblog
update
mysql
mysqli
Comments

There are no comments on this page.

New comment

Comments are welcome and encouraged, including disagreement and critique. However, this is not a space for abuse. Disagreement is welcome; personal attacks, harassment, or hate will be removed instantly. This site reflects personal opinions, not universal truths. If you can’t distinguish between the two, this probably isn’t the place for you. The system temporarily stores IP addresses and browser user agents for the purposes of spam prevention, moderation, and safeguarding. This data is automatically removed after fourteen days.

Comments powered by BalfComment

Powered by DASH 2.0