You're using an alias of 'date' instead of DateOfOrder, so that should be reflected in the array key. So: $Date = $OrderDate["date"]; -Micah On Sun October 26 2003 4:22 pm, Graeme McLaren wrote: > Hey everyone, the following query and code works fine but I can't > understand why I can't echo the $Date variable. I guess it doesn't work > fine then :( > > Any ideas ? > > G :) > > $TheDate = mysql_query("select DATE_FORMAT(DateOfOrder, '%d, %m, %Y') as > date from Orders Where Orders.ID = '$TransID'"); > > while($OrderDate = mysql_fetch_array($TheDate)) > > { > > $Date = $OrderDate["DateOfOrder"]; > > } -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php