For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > November 2004 > RE: [PHP-DB] Problems with mysql_num-rows()









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

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

2004-11-01, 3:55 pm

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
> name='$userid' and pass=password('$password')"


This is complete BS. The whole string is in double quotes -- the
presence of single quotes within it has no effect whatsoever on the
expansion of variables, nor is it necessary to escape them.

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com