Re: query works fine on console but not with PHP - why?

From: Date: Sun, 03 Aug 2003 14:17:10 +0000
Subject: Re: query works fine on console but not with PHP - why?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-29645@lists.php.net to get a copy of this message
> The error I am getting on the browser is: > > Warning: mysql_fetch_array(): supplied argument is not a valid MySQL > result resource in http://www.martekbiz.com/KCS/utils.inc on > line 52 line 52 is the following return statement in the db_fetch function : function db_fetch($results) { return mysql_fetch_array($results); } it's a php error, not mysql. I don't know the answer to the problem but FYI I find it easier to use $result and $link as globals in my php functions. ----- Original Message ----- From: "Aaron Wolski" <aaronjw@martekbiz.com> To: <php-db@lists.php.net> Sent: Sunday, August 03, 2003 2:59 PM Subject: [PHP-DB] query works fine on console but not with PHP - why? > Hi guys, > > I have the following query which returns FINE through the console but > not in PHP > > > select t.id, t.colour, t.colourID, t.price, t.type, g.thread_index, > g.groupNameUrl FROM kcs_threads t LEFT JOIN kcs_threadgroups g ON t.id = > g.thread_index WHERE g.groupNameUrl = '0-500' > > > The error I am getting on the browser is: > > Warning: mysql_fetch_array(): supplied argument is not a valid MySQL > result resource in http://www.martekbiz.com/KCS/utils.inc on > line 52 > > > > Anyone have an idea as to what it up? > > Thanks! > > Aaron > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.506 / Virus Database: 303 - Release Date: 01/08/2003

« previous php.db (#29645) next »