MySQL Forums
Forum List  »  Newbie

Re: Warning: mysql_fetch_array() expects parameter 1 to be resource
Posted by: Barry Galbraith
Date: November 29, 2010 05:08AM

Quote


$result=mysql_query($query) or die(mysql_error());

mysql_query returns a resouce if successful, or false if not.

Put some error checking in, and it'll tell you if the query is not successful.

Also, try echoing $instudID to see if it contains the expected value.
$instudID=$_POST['inputstudID']; 
echo $instudID;

Have you tried running the query from the mysql command line client to see if it returns the expected result?

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
November 27, 2010 01:15PM
Re: Warning: mysql_fetch_array() expects parameter 1 to be resource
November 29, 2010 05:08AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.