I create digiCardPass with updateTag column that is timestamp. I try:
$query1 = mysql_query("select MAX(updateTag) as updateTag from digiCardPass");
$row1 = mysql_fetch_array($query1);
$updateTag = $row1['updateTag'];
error_log("max updateTag:",$updateTag,0);
But I cannot get this error in php_error.log:
[03-May-2013 12:46:06 Asia/Phnom_Penh] PHP Notice: A non well 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 to solve this problem ?
Your error_log statement is incorrect and is causing the error message. You have a comma between your text and the variable that you want to write to the log, so it is treating the $updateTag
as the second parameter of the error_log command.
Try:
error_log("max updateTag: " . $updateTag, 0);
to get rid of your warning and write the contents of $updateTag
in the log