出现这样的情况
SQL 无效: update images set show_on_index="0" where id=$id
Mysql error description: Unknown column '$id' in 'where clause' 当我改为这样的时候!
$DB->query('update images set show_on_index="0" where id=$id');
更新无效!!!

解决方案 »

  1.   

    你的表中有没有叫id这一列的
     Unknown column '$id' in 'where clause'
      

  2.   

    把show_on_index="0"改成show_on_index=0试试看
      

  3.   

    if(!$rs=mysql_fetch_assoc($result))
               {
               echo "此记录可能已经被删除!";
               }这句有意义么?可以在前面直接加!么?
      

  4.   

    当然有id的column
    show_on_index="0"改成show_on_index=0是一样的!!!
      

  5.   

    我知道那句意义不大
    但是我不知道怎么来set rs
    不好意思,刚刚接触php!!!