Re: mysql_query problem (FINALLY FIXED !!!!!!!)

From: Date: Wed, 18 Jul 2001 01:43:48 +0000
Subject: Re: mysql_query problem (FINALLY FIXED !!!!!!!)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-58375@lists.php.net to get a copy of this message
Hi all (he says with a sheepish grin:), To all of those who tried to help with this thread, I thank you from the bottom of my heart.... Unfortunatly , the problem was not one of syntax, but rather one of gross stupidity on my behalf. The Field where I had been keeping the (encrypted) passwords was set to 6 spaces, thus chopping off at least 1/2 of the encrypted password. So when it was looking for "password('a')" (which is  60671c896665c3fa  BTW), it was only seeing 60671c in the field.....therefor NO MATCH. What a stupid mistake, delaying me for 1 1/2 days. At least I know I'm not as crazey as I thought i was going. I guess the lesson here is to step back once in a while and try looking 'around the edges' of a wall. Its amazing what you may find :). Once again, thanks to all those kind souls who gave up there own time to try to help this ol' fool. Cheers, Brad > From: "Christopher Allen" <callen@driver8.org> > Date: Tue, 17 Jul 2001 09:11:05 -0500 > To: "Brad Wright" <bradwright@optushome.com.au> > Subject: Re: [PHP] mysql_query problem (more suggestions) > > not right because this works in a live system: > > > > $query1 =" SELECT * FROM zip_base WHERE '$zip1' >= zip && > '$zip1' <= > CONCAT(SUBSTRING(zip, '1', LENGTH(zip)-LENGTH(range)), range)" > > CONCAT, SUBSTRING and LENGTH are all mysql functions and they work fine in > this query. > > .... > >> the problem is (as i understand it), the password function is a mySQL >> function and not a PHP function, therefor it works in the context of a >> mysql_query, but not as a PHP function (which your suggested code calls).. >> Unless i have actually defined a function 'password()', calling 'echo >> password('$password') will (...does, i just double checked) causes a Fatal >> Error 'Undefined Function'. >> Nice try tho :) > >

« previous php.general (#58375) next »