my querybuilder is not working - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: my querybuilder is not working (/showthread.php?tid=88322) |
my querybuilder is not working - sknair143 - 08-22-2023 Hello, I'm trying to convert this raw query to query builder : Raw query : Code: SELECT a.id as ID, a.name as NAME, b.name as DEPT Code: $this->builder() But query builder is not working as expected, I'm unable to echo the dept_name in the view, it returns null. RE: my querybuilder is not working - JustJohnQ - 08-22-2023 Maybe PHP Code: $db->getLastQuery() helps you to find the error in the query. RE: my querybuilder is not working - HermyC - 08-22-2023 [quote pid="411987" dateline="1692695462"] Try without the alias.. PHP Code: $this->builder() [/quote] |