I am having a problem with a specific query within PHP (the query will execute successfully using a sql client). The code listed below generates the following error:
Parse error: parse error, unexpected T_LNUMBER in %\www\share\index.php on line 41
If I replace the query with the following one listed below it will execute successfully:
$result = mysql_query("select * from syslogd limit 100");
Please help .....
// CODE **************
<?
$result = mysql_query("select * FROM syslogd WHERE MSGTIME >= DATE_SUB(NOW(),INTERVAL 10 MINUTE) and (MSGDATE="2002-07-10") limit 100");
printf("<TABLE BORDER=1>\n");
printf("<TR><TD>name1</TD><TD>name2</TD>\n");
printf("<TD>name3</TD><TD>name4</TD>\n");
printf("<TD>name5</TD></TR>\n");
while ($myrow = mysql_fetch_array($result))
{
printf("<TR><TD>%s</TD><TD>%s</TD><TD>%s</TD><TD>%s</TD><TD>%s</TD></TR>\n", $myrow[0], $myrow[1], $myrow[2], $myrow[3], $myrow[4]);
}
printf("</TABLE>\n");
?>