Re: MySQL Functions in WHERE clause (OT)

From: Date: Tue, 02 Jan 2001 23:43:16 +0000
Subject: Re: MySQL Functions in WHERE clause (OT)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32426@lists.php.net to get a copy of this message
Hi Ben: > Using the following line to insert values into this table. > "INSERT INTO auth (login, password) VALUES ('user', > PASSWORD('pass'))" > > Now, when I try to select by password from the table using the following, I > get nothing. It doesn't find the correct row. > "SELECT * FROM auth WHERE password = PASSWORD( 'pass' )" I just tried it from a MySQL command line. Works fine for me. Using 3.22.34-shareware-debug. Guess you're entering the wrong 'pass.' Perhaps you don't have the right permissions. What happens if you remove the where clause? If you get everything, then you have permissions and your 'pass' is mistaken. This all assumes you've named the tables and fields correctly, of course. Good luck, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#32426) next »