comparing a variable to value in DB

From: Date: Mon, 29 Jul 2002 18:46:16 +0000
Subject: comparing a variable to value in DB
Groups: php.general 
Request: Send a blank email to php-general+get-110223@lists.php.net to get a copy of this message
I have a column in my DB named username and i am trying to compare a session ID called $username to the field in my DB called username. The way i had done it before was SELECT * from tablename WHERE Tablename.username == $username, but this does not seem to be working is there a better way to do this? Also, I would like to know how to tell if a field is blank. For example, if my SELECT statement comes back and there is no data in the username column how can i check for this? _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com

« previous php.general (#110223) next »