Hey guys, I'm still fairly new to php/MySQL, but I'm learning. I'm trying to return two variables from the same database record. This is currently the code I'm using and I know its wrong because the query selects the event only. How can I also return the date it happened from that same record?
Code:
<?php
$query = 'SELECT tih_event FROM todayinhistory WHERE right(tih_date,5) = "' . $currDay . '"';
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
echo 'Year: ' . $row['tih_date'] . ' - ' . $row['tih_event'] . '<br />';
}
?>