UPDATEvideo
SET 0='page_view',1=page_view+1 WHERE ( video_id = '94' )
Error after execution
The php program is:
Model('video')->editMbVideo(array('page_view',array('exp','page_view+1')),$live_id);
Written like this
UPDATEvideo
SET 0='page_view',1=page_view+1 WHERE ( video_id = '94' )
Error after execution
The php program is:
Model('video')->editMbVideo(array('page_view',array('exp','page_view+1')),$live_id);
Written like this
<code>UPDATE video SET `page_view` = 0, `page_view` = `page_view` + 1 WHERE ( `video_id` = '94' );</code>
Note that the column identifier is `` not '', see clearly;
Update syntax:
<code>UPDATE table_name SET column1=value, column2=value2,... WHERE some_column=some_value</code>
update video set field name = field value, field name 1 = field value 1 where ......
According to your error message, it is a syntax error. The syntax of update is field name = value, not value = field name. Classmates, you should read more about SQL syntax