select * from table where :cur_field = :cur_key这样写对吗?为什么我给传递了值之后一条记录也没出现?

解决方案 »

  1.   

    select * from table where :cur_field = :cur_key 
    --------------------------------------------------
    你要干什么? 呵呵呵呵。你的字段是什么?
      

  2.   

    select * from table where cur_field =: cur_key
    还要看你的cur_key是怎么了?反正你试一下就可以了,试这个不行就试这个
    select * from table where cur_field = cur_key
      

  3.   

    谢谢大家,试过了,字段名确实不能用参数,或者是说,参数不能在=号左边?
    呵呵~~~还是使用个全局变量来存放SQL语句