GatewayWorker内置的Mysql查询函数inner join查不到数据

xiewen_kevin

Hi Walkor,

$result = $ret->query("select *  from protype_brand inner join protype on protype_brand.protype_id=protype.protype_id where protype_brand.product_code='{$product_code}'");

直接用这个query方法可以查到对应的值 ,但为什么用下面封装的方法却不行呢,获取数据一直为空

 $result = $ret->select('*')
                ->from('protype_brand')
                ->innerJoin('protype', 'protype_brand.protype_id = protype.protype_id')
                ->where("protype_brand.product_code = '{$product_code}'");

我是按照GatewayWorker文档上来写的 ,

2891 1 0
1个回答

walkor

可以echo下$result ,能够打印出sql语句,看下是否有什么不同。

年代过于久远,无法发表回答
🔝