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

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 by jamiebalfour04 in BalfBlog
php
pdo
balfblog
update
mysql
mysqli
Comments
Powered by DASH 2.0