I want to add multiple values in where clause.
------------As In Sql , we do like this------------------
SELECT column_name(s)
FROM table_name
WHERE column_name IN (value1,value2,...)
How to use this in grocery crud?
I want to add multiple values in where clause.
------------As In Sql , we do like this------------------
SELECT column_name(s)
FROM table_name
WHERE column_name IN (value1,value2,...)
How to use this in grocery crud?
use or_where
instead of where
.
e.g
function example_with_or_where() {
$crud = new grocery_CRUD();
$crud->where('productName','Motorcycle');
$crud->or_where('productName','Car');
$crud->or_where('productName','Bicycle');
$crud->set_table('products');
$crud->columns('productName','buyPrice');
$output = $crud->render();
$this->_example_output($output);
}
detail here