search

Home  >  Q&A  >  body text

Why is the native query going wrong? . .

//原生查询
              public function query(){
               $sql="SELECT 'name','email' FROM 'student' WHERE 'id' IN (4,7,8)";
                dump(Db::query($sql));
              }

尾生尾生2099 days ago1289

reply all(3)I'll reply

  • 朝游东海

    朝游东海2019-03-22 17:53:14

    SELECT id,user_id FROM tp_cart WHERE id IN ('41','42')

    SELECT id,user_id FROM tp_cart WHERE id IN ('41','42')

    SELECT 'name','email' FROM 'student' WHERE 'id' IN (4,7,8)

    注意符号

    reply
    0
  • 尾生

    Solved, thank you.

    尾生 · 2019-03-27 07:43:24
  • Cancelreply