Cannot wrap query condition between brackets |
I'm trying to check if a post title or content is equal to a specific string, and this post must have a specific type, so I wrote this query:
PHP Code: $builder = $this->post this will generate the following result: PHP Code: SELECT `blog_posts`.*, `users`.`username` as `author` and return this: but the correct query is this: PHP Code: SELECT `blog_posts`.*, `users`.`username` as `author` 'cause I need this output: is there a way to make this query using the CodeIgniter query builder?
Yes, use Query Grouping - https://codeigniter.com/user_guide/datab...y-grouping
|
Welcome Guest, Not a member yet? Register Sign In |