Re: MySQL Result Resource

From: Date: Fri, 11 Jan 2002 07:35:23 +0000
Subject: Re: MySQL Result Resource
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-15655@lists.php.net to get a copy of this message
On Friday 11 January 2002 10:33, Necro wrote: > Ok, > > > I have tried to go to PASSWORD after none of the suggestions worked out. > > The current statement is: > $arg = "select password, 1 as auth from acl where username='$username' and > password = 'PASSWORD($password)'"; > > But the error I get now is: > select password, 1 as auth from acl where username='andrewd' and password = > 'PASSWORD(madonna)'Resource id #2 > > Any ideas? > > Andrew Both PASSWORD and MD5 expect a *string* as an argument so you need to enclose the argument in either single quotes or double quotes. $arg = "SELECT password, 1 AS auth FROM acl WHERE username = '$username' AND password = PASSWORD('$password')"; Hopefully that should work ;-) -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* Love is the process of my leading you gently back to yourself. -- Saint Exupery */

« previous php.db (#15655) next »