update table set u=1 where (id=2 ....... ) or ( u!='a')

解决方案 »

  1.   

    update table set u=1 where id=2 limit 1
     select * from table where u!='a'
    2句都选择然后F5不行吗?
      

  2.   

    to tangqijun199(撒旦)
    --------------
    update table set u=1 where (id=2 ....... ) or ( u!='a')
    --------------
    这样不行啊,要保持最后是 where u!='a' ,而不能在最后加任何东西。
      

  3.   

    没明白你的意思??
    语句里面是不可能有2个where的.
    你的where……where……主要是想实现一个什么功能?u!='a' 是什么意思?
    为什么最后要  where u!='a' 而不能在最后加任何东西
      

  4.   

    to tangqijun199(撒旦)
    如果在一句 sql 语句中不能有 两个 where 的话,那你刚才所说的update table set u=1 where id=2 limit 1
     select * from table where u!='a'
    2句都选择然后F5不行吗?也不行啊。就是说语法错误。
    我看过phpmyadmin里是把两句话分开再独立执行的,所以我估计还是不可以的。
    也就是说我就没办法了。没什么。我的目的是用自己程序的漏洞去讨回公道。因为有人用我的程序不给钱,而我没留后门。想做些东西。实在无奈,现在的人素质太低了。
    而我现在可以执行的sql语句是:update table set u=$set where u!='a'
    而这个 $set 是php变量,但对方服务器会为" ' " 加上 " \ "的。所以我没办法。
      

  5.   

    其实也可以分开写一起执行的.
    update table set u=1 where id=2 .......  
    update table set u=1where  u!='a'个人建议不负法律责任:
    你还不如做个触发器.当有数据插入时……