php - how to select MAX(updateTag) -
i create digicardpass updatetag column timestamp. try:
$query1 = mysql_query("select max(updatetag) updatetag digicardpass"); $row1 = mysql_fetch_array($query1); $updatetag = $row1['updatetag']; error_log("max updatetag:",$updatetag,0);
but cannot error in php_error.log:
[03-may-2013 12:46:06 asia/phnom_penh] php notice: non formed numeric value encountered in /applications/mamp/htdocs/passeswebserver/createpass/index.php on line 42 [03-may-2013 12:46:06 asia/phnom_penh] max updatetag:
//line 42: error_log("max updatetag:",$updatetag,0);
how solve problem ?
your error_log statement incorrect , causing error message. have comma between text , variable want write log, treating $updatetag
second parameter of error_log command.
try:
error_log("max updatetag: " . $updatetag, 0);
to rid of warning , write contents of $updatetag
in log
Comments
Post a Comment