Help Needed

From: Date: Thu, 01 Aug 2002 19:17:33 +0000
Subject: Help Needed
Groups: php.db 
Request: Send a blank email to php-db+get-20955@lists.php.net to get a copy of this message
hi, I have started working with PHP-MySQL recently. I have been getting a warning message which i am not able to debug. Could some one pls help me out? The message is Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /usr/local/apache2/htdocs/verify.php on line 37 The code is
      @$db=mysql_pconnect("localhost:/var/lib/mysql/mysql.sock","","");
      if(!$db)
      {
       echo " The Server is Busy. Please Try Later ";
       exit;
      }
     mysql_select_db("userinfo");
     $query = "select * from userinfo";
     $mysql_results = mysql_query($query,$db);
line 37:$num_result = mysql_num_rows($mysql_results);
     if($num_result == 0)
      {
        echo "<P>Invalid Username or Password entered</P>";
        exit;
      }
Regards, Manoj 'I have miles to go before I sleep, and promises to keep'

« previous php.db (#20955) next »