This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

PDO
#1

Hi Steven,

I see in the Roadmap that switching from MySQL to MySQLi is planned.
Have you considered switching to PDO?

Maybe PDO is a better choice, it seems to have many advantages over MySQLi, you can check e.g.:
http://net.tutsplus.com/tutorials/php/pd...d-you-use/

http://net.tutsplus.com/tutorials/php/wh...se-access/

http://wiki.hashphp.org/PDO_Tutorial_for...Developers


Just a suggestion…
Keep on the fantastic work!
Reply
#2

Hi Ron,

Yeah PDO is a good choice. If I were to rewrite Commentics from scratch I would probably use it. However switching from MySQL to MySQLi is so easy. For the most part, it's simply a case of appending the letter 'i' to the existing functions. For example,

PHP Code:
<?php 
$query
= mysql_query("SELECT `id` FROM `" . $cmtx_mysql_table_prefix . "comments` WHERE `id` = '$id'");

to:

PHP Code:
<?php 
$query
= mysqli_query("SELECT `id` FROM `" . $cmtx_mysql_table_prefix . "comments` WHERE `id` = '$id'");

Due to this, I believe that switching Commentics to MySQLi will be done in a matter of minutes by doing a global search and replace. Switching to PDO would take a long time, and as MySQLi is perfectly adequate I don't think it would be worth it. I'd prefer to spend that time developing features etc.

Have you completed the interview?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)