thinkphp联表查询这样写为什么没有结果?
橱窗的光
橱窗的光 2017-03-14 09:30:34
0
2
841
$sql = "select p.*,u.key_name from record p left join sys_user u on p.create_entity=u.id where u.key_name='admin' and p.punch_time between '2017-03-01' and '2017-03-08'";
$hr_punch_record = M() -> query("$sql");
var_dump($hr_punch_record);


橱窗的光
橱窗的光

reply all(2)
数据分析师

thinkphp joint table query written like this why there is no result? -PHP Chinese website Q&A-thinkphp joint table query written like this why there is no result? -PHP Chinese website Q&A

Let’s take a look and learn.

迷茫

$hr_punch_record = M() -> query("$sql");

换成

$hr_punch_record = M() -> query($sql);

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template