Reputation: 995
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
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