Code:
$result=mysql_query("SELECT * FROM sk_recvitem WHERE 1");
$shipdate=mysql_result($result,1,"shipdate");
if ($shipdate = "0000-00-00") $shipdate="NONE"; I have the above code accessing a MySql database to return a date field so I can place it on my webpage. If the date field has not been set, the value in $shipdate shows up as 0000-00-00 but I'd like the field to show NONE. The above IF test ALWAYS evaluates to true though. I can't use empty($shipdate) because it appears to contain 10 characters. How should I test for this?