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
IL PROTECTED]> Reply-To: "Arne Essa Madsen" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: [PHP-DB] Problems with mysql_num-rows() Date: Sun, 31 Oct 2004 19:32:09 +0100 I have the following problem: This one does not work: $query = "SELECT * from user where name='

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

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

2004-10-31 Thread Arne Essa Madsen
I have the following problem: This one does not work: $query = "SELECT * from user where name='$userid' and pass=password('$password')"; $result = mysql_query($query, $link); $num_rows = mysql_num_rows($result); I get this error message: Warning: mysql_num_rows(): supplied argument is not a