duanchu0031 2012-07-21 10:08 采纳率: 0%
浏览 64
已采纳

'where子句'中的未知列,而列存在

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

  • 写回答

1条回答 默认 最新

  • doudi1750 2012-07-21 10:12
    关注

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?