odd results with database string comparisons

From: Date: Thu, 12 Aug 2004 18:46:07 +0000
Subject: odd results with database string comparisons
Groups: php.general 
Request: Send a blank email to php-general+get-193625@lists.php.net to get a copy of this message
I have a database table with the column described as address_line_2 varchar(255) NOT NULL default '', when I do a select I want to see if there is anything in that column if there is text I will display it in a html table if there is nothing (the table default) I will write   However the following statement returns false regardless of if I have entered data or not! if($row["address_line_2"]==' ') // there is a space between the quotes Please can you help me solve this, and let me know how I should construct my table and perform string comparisons. Thanks

« previous php.general (#193625) next »