select * from [b_articles] where or title '%的%' or content '%的%' and cid in (select id from [b_article_categories] where parent =34)    高手帮助

解决方案 »

  1.   

    or title ???     多了or了吧
      

  2.   

    select * from [b_articles] where or title '%的%' or content '%的%' and cid in (select id from [b_article_categories] where parent =34)加粗的or是多余的
      

  3.   

    你where后面怎么什么语句都没加就开始用or了?
      

  4.   

    where title like '%的%' or content like '%的%' and 
      

  5.   

    而且是模糊查询的话  列名后便要用like关键字
    select * from [b_articles] where title like '%的%' or content like '%的%' and cid in (select id from [b_article_categories] where parent =34) 
    你这样试试
      

  6.   

    select * from [b_articles] where title like '%的%' or content like '%的%' and cid in (select id from [b_article_categories] where parent =34)
      

  7.   

    改成这样试试:select * from [b_articles] where (title like '%的%' or content like '%的%') and cid in (select id from [b_article_categories] where parent =34)
      

  8.   

    select * from [b_articles] where or title '%的%' or content '%的%' and cid in (select id from [b_article_categories] where parent =34)加颜色的 or 是多余的select * from [b_articles] where  title '%的%' or content '%的%' and cid in (select id from [b_article_categories] where parent =34)
      

  9.   

    select * from [b_articles] where or title '%的%' or content '%的%' and cid in (select id from [b_article_categories] where parent =34) 改成select * from [b_articles] where (title '%的%' or content '%的%') and cid in (select id from [b_article_categories] where parent =34)
      

  10.   

    补充
    select * from [b_articles] where title '%的%' or content '%的%' and cid in (select id from [b_article_categories] where parent =34)你这条语句的意思相当与select * from [b_articles] where title '%的%' or (content '%的%' and cid in (select id from [b_article_categories] where parent =34))
      

  11.   

    select * from [b_articles] where (title like '%的%' or content like '%的%') and cid in (select id from [b_article_categories] where parent =34)
    查询分析器执行
      

  12.   

    select * from [b_articles] where or title '%的%' or content '%的%' and cid in (select id from [b_article_categories] where parent =34) 
    是还有条件 还是多了个or
      

  13.   


    多了个or 还少了likeselect * from [b_articles] where title like '%的%' or content like '%的%' and cid in (select id from [b_article_categories] where parent =34)
      

  14.   

    很明显的多or少like
    LZ回去把sql的语法再看看吧
      

  15.   

    select * from [b_articles] where title like '%的%' or content like '%的%' and cid in (select id from [b_article_categories] where parent =34)  
      

  16.   

    select * from [b_articles] where title like '%的%' or content like '%的%' and cid in (select id from [b_article_categories] where parent =34)
      

  17.   

    select * from [b_articles] where (title '%的%' or content '%的%' ) and cid in (select id from [b_article_categories] where parent =34) 
      

  18.   

    select * from [b_articles] where (title '%的%' or content '%的%' ) and cid in (select id from [b_article_categories] where parent =34)   试试这个,应该行了
      

  19.   


    select * from [b_articles] where (title like '%的%' or content like '%的%') and cid in (select id from [b_article_categories] where parent =34)
      

  20.   

    where 后面就有 or 太快了