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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -