PHP Mysql query data conversion newbie

From: Date: Sat, 28 Apr 2001 16:01:22 +0000
Subject: PHP Mysql query data conversion newbie
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-52129@lists.php.net to get a copy of this message
Hello, I pull some data from mysql with the php code below. On the date field if there is no date on mysql it displays : 0000-00-00 00:00:00 I would like to change this 0000-00-00 00:00:00 to "no date" for example.. Or if the cel is empty to " " (because otherwise the tableborders are messed up) I tried to put an if statement inside the while {} but i cannot figured out... Thank You, Andras {$aresult=mysql_query("select * from media where d like '$city' order by i" ,$db);} while($amyrow = mysql_fetch_array($aresult)) { echo "</td><td><font face=verdana size=1>"; echo $amyrow["i"]; echo "</td><td><font face=verdana size=1>"; echo $amyrow["j"]; echo "</td><td><font face=verdana size=1>"; echo $amyrow["f"]; echo "</td>"; }

« previous php.general (#52129) next »