DATE_FORMAT is flaking out
Posted: Sun Aug 18, 2002 3:22 pm
Hi there,
I'm returning a resultset from mysql into php and i'm simply trying to format the mysql yyyy-mm-m-dd into something nicer looking.
The problem is, when i run the query in mysqlgui for windows it return everything properly, but when i try to return the result to my php and print it out, i get errors...
Can someone point me in the right direction?
Here's my code:
THe error says...
Notice: Undefined index: tdate in C:\php\calendar.php on line 487
Thanks in advance for any guidance[/b]
I'm returning a resultset from mysql into php and i'm simply trying to format the mysql yyyy-mm-m-dd into something nicer looking.
The problem is, when i run the query in mysqlgui for windows it return everything properly, but when i try to return the result to my php and print it out, i get errors...
Can someone point me in the right direction?
Here's my code:
Code: Select all
$query = "SELECT DATE_FORMAT(itemdue, '%M %d %y') as tdate FROM calendar";
$result = mysql_query($query, $conn);
$num_rows= mysql_num_rows($result);
if ($num_rows != 0) {
while ($row = mysql_fetch_row($result)) {
$theDate = $rowї'tdate'];
$showData = "$showData<tr><td class='text-normal'>$theDate</td></tr>";
}
}Notice: Undefined index: tdate in C:\php\calendar.php on line 487
Thanks in advance for any guidance[/b]