In Codeigniter 3.0.3 you can do it simple like this :
$this->db->select()
->from('users')
->where('name !=', 'Joe')
->group_start() // Open bracket
->where('age <', 69)
->or_where('id <', $id)
->group_end(); // Close bracket
Perhaps it can help
More Related Contents:
- How to select rows where column value IS NOT NULL using CodeIgniter’s ActiveRecord?
- Escaping SQL queries in Codeigniter
- how to select only one value sql
- How to create codeigniter dynamic menu from single table
- Comma separated numeric values – PHP CodeIgniter
- CodeIgniter – foreach loop
- PHP – Change value y,n in database [closed]
- How to insert multiple rows from array using CodeIgniter framework?
- strange character encoding of stored data , old script is showing them fine new one doesn’t
- CodeIgniter: Unable to connect to your database server using the provided settings Error Message
- Find total number of results in mySQL query with offset+limit
- How to create Codeigniter batch insert array
- How to add an ORDER BY clause using CodeIgniter’s Active Record methods?
- How can I Use Prepared Statements in CodeIgniter
- What are the differences between backtick and single quote? Can I use IF statement in a query as above?
- How to create Codeigniter language files from database?
- Trying to get property of non-object – CodeIgniter
- Codeigniter Transactions
- Inserting NOW() into Database with CodeIgniter’s Active Record
- mysqli or die, does it have to die?
- PHP file cannot enter some part of code
- Laravel: PDOException: could not find driver
- CodeIgniter htaccess and URL rewrite issues
- Doing a while / loop to get 10 random results
- php file upload, how to restrict file upload type
- CodeIgniter activerecord, retrieve last insert id?
- MySQL error when inserting data containing apostrophes (single quotes)?
- Using MySQL’s TIMESTAMP vs storing timestamps directly
- SQLSTATE[HY000] [1698] Access denied for user ‘root’@’localhost’
- Which MySQL datatype to use for an IP address? [duplicate]