1

I get this error:

Error: UPDATE stats SET stat2='2' WHERE name=views
Unknown column 'views' in 'where clause'

In the table 'name' is the column, and 'views' is a value in that column.

As far as I can tell from the documentation the statement "WHERE name=views" should be read as "WHERE {column}={cell value}", whereas the error is inferring that the column name is the second value.

1 Answers1

2

You need to put the values within '' since it's a string value

UPDATE stats SET stat2='2' WHERE name='views'
Fahmi
  • 37,315
  • 5
  • 22
  • 31