Re: Pear Auth and SQL

From: Date: Sat, 08 Dec 2001 23:34:34 +0000
Subject: Re: Pear Auth and SQL
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-587@lists.php.net to get a copy of this message
Your $a will be taken literally rather that interpolated. Use this: $UserDetailsSQL = 'SELECT * FROM users WHERE UserID="'.addslashes($a->getUsername()).'"'; -Jason Garber IonZoft.com At 10:49 PM 12/8/2001 +0000, Simon H wrote:
Can anyone explain to me why this wont work, or if there is another way to use the (logged on) users Username in a query: $UserDetailsSQL = 'SELECT * FROM users WHERE UserID = $a->getUsername()'; I've tried every alternative my limited brain can think of using quotes, %s, etc, and still no luck. Thanks Simon H -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, e-mail: pear-general-unsubscribe@lists.php.net For additional commands, e-mail: pear-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.pear.general (#587) next »