Hello
I have data in the mysql database that I know is there but cannot get the code right to get it out........
code is
$today = date('Y-m-d');
$query = "SELECT Date, Ref FROM tblDate WHERE First = $today";
$result = mysql_query($query)
or die(mysql_error());
while ($row = mysql_fetch_array($result));
$Ref[] = $row["Ref"];
$Date[] = $row["Date"];
print_r($Date);
print_r($Ref);
when I test this the data that should come out (because I put the data in the database specifically to test this) is
Array ( [0] =>8, [1]=>7 ) Array ( [0] =>1, [1] =>1 )
but instead I am getting
Array ( [0] => ) Array ( [0] => )
any ideas what I am getting wrong?
TIA