illegal offset type warnings

From: Date: Tue, 05 Mar 2002 21:06:01 +0000
Subject: illegal offset type warnings
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-932@lists.php.net to get a copy of this message
question: i'm doing some testing of some code on an empty table (i'm not expecting any results)... i create the connection object and set DB_FETCHMODE_ASSOC outside the function. i am using php4.1.2, postgresql 7.1 ---code--- function getCaseList() { global $dbh; $query = "select case_id from ".DB_CASE_DATA_TABLE." order by case_id"; $result = $dbh->query($query); if(DB::isError($result)) { $error = new PEAR_Error($result->getMessage()); return $error; } $case = array(); error_log("marker1"); while($row = $dbh->fetchRow($result)) { $case["case_id"] = $row["case_id"]; $this->cases[] = $case; } error_log("marker2"); return true; } ---code--- i receive the following warning msgs in the log: [Tue Mar 5 15:24:40 2002] [error] marker1 [Tue Mar 5 15:24:40 2002] [error] PHP Warning: Illegal offset type in /usr/local /lib/php/DB/pgsql.php on line 295 [Tue Mar 5 15:24:40 2002] [error] PHP Warning: Illegal offset type in /usr/local /lib/php/DB/pgsql.php on line 296 [Tue Mar 5 15:24:40 2002] [error] marker2 could this be because the table is empty?

« previous php.pear.general (#932) next »