$link = mysql_connect ( "db.localhost.org", $user , $pass ) or die (
"Couldn't Connect to Mysql Server" );
$db = mysql_select_db( $dbname, $link );
$query = "SELECT * FROM users WHERE screen_name = '$screen_name' AND ...

That should work..

Bob

"Luke Kearney" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello All,
> I am struggling to understand why my query throws an error the code as
below
>
> $link = mysql_connect ( "db.localhost.org", $user , $pass );
> if ( ! $link )
>  die ( "Couldn't Connect to Mysql Server" );
>  print "Sucessfully connect to server <p>";
>  $query = "select * from users "
>           ."where screen_name='$screen_name' "
>     ." and passwd=password('$passwd')";
>  $result = mysql_query($query, $link);
>  if (mysql_num_rows($result) >0 )
>
> When executed you get a little message back like this one
>
> Warning: Supplied argument is not a valid MySQL result resource in
> /usr/local/share/doc/apache/trial/authmain.php on line 20
>
> What does this generally mean as I have noted that others use this syntax
so
> what is my issue ?
>
> Any help or pointers to references would be most appreciated.
>
> Thanks
>
> Luke K
>
>



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

Reply via email to