Forum Moderators: open

Message Too Old, No Replies

supplied argument is not a valid MySQL result .

Can somebody tell me what this means?

         

lookielookies

2:11 pm on Apr 8, 2007 (gmt 0)

10+ Year Member



Installation of a script brings up this message:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /mypathto/read.php on line 60

Can somebody tells me what it means?
I know others have been able to install the script without any problem.

Greetz!
Mieke

souFrag

7:54 pm on Apr 8, 2007 (gmt 0)

10+ Year Member



The argument that mysql_fetch_array() is receiving is not a valid MySQL result resource..... :-)

In other words, the error should be above that line.

Something like:

$rs = mysql_query(...);
mysql_fetch_array($rs);

it should be something like:

if(($rs = mysql_query(...))) mysql_fetch_array($rs);

PS: I don't know if those are exactly the name of the functions... because I usually use an abstraction rather than the php built-in functions (eg. ADOdb).

eelixduppy

8:29 pm on Apr 8, 2007 (gmt 0)



Welcome!

It's most likely a problem with your query. Add the following to get some more information about the error:


$result = mysql_query($query) [b]or [url=http://www.php.net/die]die[/url]([url=http://www.php.net/mysql-error]mysql_error[/url]());[/b]