mysql查询

1、不加表前缀查询

$data = db()->table("表名(全称)")

 

2、join不加表前缀

$workorder=db("workorder")
    ->field("p.exposure_time1")
    ->alias('wo')
    ->join(["sc_product" => "p"],"p.id=wo.product_id")
    ->where("work_order_no",$jtgdinfo['work_order_no'])
    ->find();

 

 3、tp3.2

->where("id.=",1)
 
 
posted @ 2022-08-01 11:11  cmooc  阅读(26)  评论(0编辑  收藏  举报