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

[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 =