RE: [PHP] PHP Mysql query data conversion newbie

2001-05-10 Thread Don Read
On 09-May-01 Jon Haworth wrote: be sure to check for the NULL : if (isset($amyrow["date"])) { >if ($amyrow["date"] == "-00-00 00:00:00") { > echo "no date"; >} else { > echo $amyrow["date"]; >} }

Re: [PHP] PHP Mysql query data conversion newbie

2001-05-09 Thread bill
On Sat, 28 Apr 2001, Andras Kende wrote: > 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 : -00-00 > 00:00:00 > > I would like to change this -00-00 00:00:00 to "no date" for example.. hmm... mysql can do this,

Re: [PHP] PHP Mysql query data conversion newbie

2001-05-09 Thread Andras Kende
; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, May 09, 2001 9:09 AM Subject: RE: [PHP] PHP Mysql query data conversion newbie > Well, it's not immediately obvious whether your date is in "i", "j", or "f", > so let

RE: [PHP] PHP Mysql query data conversion newbie

2001-05-09 Thread Jon Haworth
Well, it's not immediately obvious whether your date is in "i", "j", or "f", so let's pretend it's in "date" :-) Try this: while($amyrow = mysql_fetch_array($aresult)) { echo ""; echo $amyrow["i"]; echo ""; echo $amyrow["j"];