> I have a MySQL database (called "sessions") with a auto-increment > INT field called "sessionID". I try to check if there is already > a record in this database with a given sessionID, which is called > $sessionID in PHP. I use this query, which must be wrong (but I > cannot find out why !!!) : > > SELECT * FROM sessions WHERE sessionID = $sessionID
Although this may or may not help depending on your code (please post it if you still haven't found a solution...it's the best way for us to help. Try SELECT * FROM sessions WHERE sessionID = '$sessionID' Although if $sessionID contains an integer (which I assume is would) the quotes aren't needed, you never know. Some OSes are quirky. Also you may want to add an echo mysql_error(); line after your initial mysql_query to see if perhaps there's a problem with PHP communicating with MySQL. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php