mysql临时表代替in的写法

mysql临时表代替in的写法

     $sql = "create temporary table tmp(id int(4) primary key)";
        $this->commonexecute($sql);
        $sql = "insert into tmp values  (23), (433)";
        $this->commonexecute($sql);

        $sql='select aa_copy_copy.name from aa_copy_copy,tmp where aa_copy_copy.id=tmp.id';
        $info=$this->commongetinfo($sql);

 

posted @ 2021-07-06 11:16  newmiracle宇宙  阅读(196)  评论(0编辑  收藏  举报