Help writing Sql with CI4 active record |
Hello. I 'm struggling to write sql with subquery, How can I write it with codeigniter methods.
Thanks! //SQL PHP Code: SELECT p.id, p.catId, p.image, c.id, (c.name) as category
https://codeigniter.com/user_guide/datab...cific-data
Quote:$builder->where() - 5) Subqueries: You can use an anonymous function to create a subquery.
@venance,
Also, don't forget you write out the whole query using query bindings (https://codeigniter.com/user_guide/datab...y-bindings). |
Welcome Guest, Not a member yet? Register Sign In |