There is a problem updating a sql statement.

WBOY
Release: 2023-03-02 09:02:02
Original
1104 people have browsed it

UPDATEvideo SET 0='page_view',1=page_view+1 WHERE ( video_id = '94' )
Error after execution
There is a problem updating a sql statement.

The php program is:
Model('video')->editMbVideo(array('page_view',array('exp','page_view+1')),$live_id);
Written like this

Reply content:

UPDATEvideo SET 0='page_view',1=page_view+1 WHERE ( video_id = '94' )
Error after execution
There is a problem updating a sql statement.

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>
Copy after login
  1. Note that the column identifier is `` not '', see clearly;

  2. Update syntax:

<code>UPDATE table_name
SET column1=value, column2=value2,...
WHERE some_column=some_value</code>
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template