That means either your $result doesn't exist or the query you used to get
$result failed.

Use something like this (at least in PHP) to see what MySQL's error was:

if ($result=mysql_query($query))
{
//worked
//echo mysql_num_rows($result);
}
else
{
//didn't work
$errMsg="Failed Query: $customer_select<br>".mysql_errno()." :
".mysql_error();

echo $errMsg; echo "<P>";
}

Ryan Shrout

-----Original Message-----
From: Felicia [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 9:29 AM
To: mysql post
Subject: mysql/php


I am trying to use php to print my results.  This is my code (I have checked
to see if fields are correct with regards to spelling and so on):
 
printf("Genus: %s<br>\n", mysql_result($result,0,"genus"));
 
and I get the error message:
 
Warning: Supplied argument is not a valid MySQL result resource in
/home/sites/site197/web/practice/phpmysqlpract.php on line 26
Genus:
 
 
Can you tell me what I am doing wrong? 


"The last of the human freedoms is to choose one's attitudes." 
-Victor Frankl  
 


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to