Harish Kumar
Harish Kumar

Reputation: 995

Unknown column in 'where clause' whereas column exist

i m trying to update a column sort where value = 0 but its showing me this error

Unknown column 'sort' in 'where clause'

i am using the following query

mysql_query("UPDATE `category` SET `sort`='1' WHERE `sort`='0'")

the sort colum is exist on the database but i dont know y its not updating

Upvotes: 0

Views: 357

Answers (1)

a sad dude
a sad dude

Reputation: 2825

The query is correct. That would mean that your observation - that column sort exists in table category in the currently selected DB - is incorrect.

Upvotes: 2

Related Questions