2013-05-03 45 views

回答

2

的WHERE在GroceryCrud子句的工作方式完全一樣笨的WHERE子句:

$this->db->where_in('columnname', $arrayvalues); 

希望這可以幫助你,不要猶豫,繼續提問=)

GroceryCrud文件建立WHERE

0

使用or_where而不是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); 
} 

詳細here