I have a date stored in a mysql table. I am retrieving that date along with other data from that table using the mysql_fetch_array as shown below:
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
while ($row = mysql_fetch_array($result)){
print("$row[field1], $row[field2], $row[ShowDate]), $row[field4]");
}
I tried formating the date with sql using DATE_FORMAT(ShowDate,"%c/%e/%Y") and this did not work within my script. I have also tried using php's date("m/j/Y", $row[ShowDate]) but I think my syntax is incorrect.
Can anyone suggest what I'm doing wrong?
thnx