Hi!
Some of you have probaly seen this before.....
I'm pretty new in this and have a problem about reformatting a DATE field from a mySQL db to DDMMYYYY.
After looking in the manual I tried this and it does not work:
<?PHP
MYSQL_CONNECT("127.0.0.1","root") OR DIE("No connection to database");
mysql_select_db("theater") OR DIE("Unable to find database");
$query = mysql_query("SELECT date_format(opening,'%d%m%Y'),headline,text,credits FROM opera ORDER BY opening");
ECHO "<TABLE WIDTH=100% BORDER=1 CELLSPACING=0 CELLPADDING=0>";
while($r = mysql_fetch_array($query)){
$headline = $r["headline"];
$opening = $r["opening"];
$text = $r["text"];
$credits = $r["credits"];
"<TR><TD>$headline</TD></TR><TR><TD VALIGN=top>Opening night: $opening</TD></TR><TR><TD VALIGN=top>$text</TD></TR><TR><TD VALIGN=top>$credits</TD></TR>
}
"</TABLE>";*/
}
?>
Everything else is showing as it should, but not at all the date! As I said, I'm pretty new in mySQL and PHP, but where did I go wrong???
Ole