RE: [PHP-DB] Problems with mysql_num-rows()

2004-11-01 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 01 November 2004 05:01, Doug Thompson wrote: > The variables are not being expanded. As a minimum, you need to > escape the single quotes. $query = "SELECT * from user where >

Re: [PHP-DB] Problems with mysql_num-rows()

2004-10-31 Thread Doug Thompson
The variables are not being expanded. As a minimum, you need to escape the single quotes. $query = "SELECT * from user where name=\'$userid\' and pass=password(\'$password\')" Alternatively, you can concatenate the expanded variables. $query = "SELECT * from user where name='".$userid."' and p

RE: [PHP-DB] Problems with mysql_num-rows()

2004-10-31 Thread Bastien Koert
Very simply, either your connection is messed up, you are not getting a result set back or there is an error in your sql try this: $result = mysql_query($query, $link) or die ("failed because ".mysql_error()); then start debugging bastien From: "Arne Essa Madsen" <[EMAIL PROTECTED]> Reply-To:

Re: [PHP-DB] Problems with mysql_num-rows()

2004-10-31 Thread Jason Wong
On Sunday 31 October 2004 18:32, Arne Essa Madsen wrote: > I have the following problem: > > This one does not work: > $query = "SELECT * from user where name='$userid' and > pass=password('$password')"; print $query; > $result = mysql_query($query, $link); Use mysql_error(). -- Jason Wong