You don't need the AS part, you can also do
PHP Code:
$result = mysql_query("SELECT destination, DATE_FORMAT(departureDate, '%d/%m/%Y') FROM entires WHERE departureDate >= '$dep3' AND departureDate <= '$dep3' + INTERVAL '7' DAY");
while($row = mysql_fetch_assoc($result))
{
echo $row['DATE_FORMAT(departureDate, \'%d/%m/%Y\')'];
}
But as you can see, that's rather hard to read, and you have to change the PHP if you ever change the date format.
So it's easier to use "AS formattedDate" and then use $row['formattedDate']
Bookmarks