Re: [PHP-DB] Problem with PDO Mysql and FETCH::ASSOC

2009-03-20 Thread Thodoris
Hello, I am using the following code to perform queries on a MySQL database: $dbh = new PDO($GLOBALS['database'],$GLOBALS['username'],$GLOBALS['password']); $dbh-setAttribute(PDO::ATTR_EMULATE_PREPARES, true); $dbh-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $query =

Re: [PHP-DB] Problem with PDO Mysql and FETCH::ASSOC

2009-03-20 Thread Thomas Robitaille
Does anyone have any ideas as to what I might be doing wrong? Thanks for any help! Thomas First of all check if you are actually connecting to the same database both times. Start with printing $GLOBALS['database'] and see if it connects where you really want. You mentioned a field

Re: [PHP-DB] Problem with PDO Mysql and FETCH::ASSOC

2009-03-20 Thread Christopher Jones
Thomas Robitaille wrote: I've managed to fix the issue by switching to a 32-bit installation of MySQL and Apache. The problem appeared to be due to the 64-bit versions somehow. If you think there's a bug (and you tested the latest version of PHP), please report the problem at

[PHP-DB] Problem with PDO Mysql and FETCH::ASSOC

2009-03-19 Thread Thomas Robitaille
Hello, I am using the following code to perform queries on a MySQL database: $dbh = new PDO($GLOBALS['database'],$GLOBALS['username'], $GLOBALS['password']); $dbh-setAttribute(PDO::ATTR_EMULATE_PREPARES, true); $dbh-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $query =