MySQLi in PHPAdsNew 2.0.7

15 November 2005 • article | PHP • PermaLink

Here is a quick patch for users of PHPAdsNew who are running their site on PHP5 and MySQL 4.1.

PHP5 introduced support for an enhanced MySQL 4.1 library called MySQLi. If you’ve compiled in MySQLi support into your copy of PHP (using --with-mysqli=/path/to/mysql_config), then you should use the newer, more efficient MySQLi functions to access the database.

Benefits of MySQLi include much faster queries and, in my experience, much fewer open connections between PHP and the MySQL server. On the ad server I administer, we went from an average of 600 running processes to around 16, with no degradation in performance.

Here is the patch against PHPAdsNew 2.0.7. Enjoy!

mysqli-phpAdsNew-2.0.7.patch

Comments