PDO rowCount() not working in PHP 5.1.6

Wojtek on bug, MySQL, PDO, PHP, rowcount · · Comments · 2 min read

The bug If you’re running PHP 5.1.6 and just started using PDO for your database connection, it’s likely you’ll run into quite an annoying bug. Lets test a simple query partly taken from PHP documentation. $calories = 150; $colour = 'red'; $sth = $myPDO->prepare('SELECT name, colour, calories FROM fruit WHERE calories < :calories AND colour... Read more »

MySQL PHP PDO error in xampp

Wojtek on MySQL, PDO, PHP, xampp, Windows · · Comments · 1 min read

If your PDO scripts are crashing Apache after installing xampp 1.7 for windows all you need to do is: download this package http://windows.php.net/downloads/releases/php-5.2.11-nts-Win32-VC6-x86.zip" unzip copy libmysql.dll into xampp\apache\bin and xampp\php restart apache All should be good now.... Read more »