在代码点火器中有没有人知道使用内部关节和条件?
我的代码sql:
function call_detail()
{
$tSQL = "select a.Kode, b.name as Costumer, b.address, c.date, c.date1, f.subtotal, f.price from Table_1 a inner join Table_2 b on A.Kode = b.Kode inner join Table_3 c on A.Kode = c.kode inner join Table_4 d on c.Kode = d.Kode inner join Table_5 e on d.kode = e.Kode left join (select kodett, sum(quntity) as QTY, sum(Price) as Price from Table_3 where kodeAA is not null group by kodeAA) f on c.Kode = F.kodeAA Where e.kode = 'OK' and c.date is null and c.kodeAA is null and c.kode = $Kode";
$query = $this->db->query($tSQL);
$query = $this->db->get();
return $query->result();
}
我的代码有问题吗?错误说“消息:未定义的变量:Kode”
答案 0 :(得分:0)
使用a.Kode而不是A.Kode
也许您可以提供有关您的问题的更多详细信息。也许你可以提供你的桌子以及你想用它做什么。