Jump to content

mysql query result


Recommended Posts

guyssee this code plz:$result = mysql_query("SELECT * FROM sometable WHERE st_id=".$_REQUEST['id']);//how to check that there is a result from that query//before i add this code$row=mysql_fetch_array($result);//coz if $result does not contain any result from the query//an error will occur when i want to fetch any empty result in $row//then i will see this msg:/*Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\inetpub\wwwroot\php\login.php on line 62wrong password*/how to make sure that query gave me a result ?before i start with the 2nd line

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...