Bulletin board, there is a request for the formation of the action of paid services:
function applyStatus($id, $act) { if($act=='top') $sql="UPDATE board SET top_time='".(14 * 86400 + time())."' WHERE id='{$id}'"; elseif($act=='color') $sql="UPDATE board SET is_color='1' WHERE id='".functions::q($id)."'"; $sql="UPDATE board SET is_important='1' WHERE id='".functions::q($id)."'"; return mysql_query($sql); } Where at start-up, the "top_time" table is triggered by time for 2 weeks - as a paid service, and "is_color" or "is_important", if they are used, it is activated to the position "1" (these are eternal).
At the same time, no service updates the current date. I need to, in addition to these actions, also update the date for all lines of services. That is, the service itself and the announcement is higher in the list (by date). The time format is now TIMESTAMP. The desired time table.
I tried to substitute this for each service:
$sql="UPDATE board SET time='".(data = NOW())."'"; Did not work. Error code:
Parse error: syntax error, unexpected '=' in Z: \ home \ test1.ru \ www \ service.php on line 53