you need a second REQUIRED parameter:

mysql_result

                            (PHP 3, PHP 4 )

                            mysql_result -- Get result data

                            Description

                            mixed mysql_result ( resource result, int
row [, mixed field])

as copied from php's doc site...

http://www.php.net/manual/en/function.mysql-result.php

Manoj Japher wrote:

> 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'
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--
Leo G. Divinagracia III
[EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to