php - search data into one table in multiple rows
Get the solution ↓↓↓Solution:
You have to useOR
operation
Your code is :
function prd_search($query)
{
$q= $this->db->from('purchase')
->like('item_name',$query)
->or_like('item_code',$query)
->get();
return $q->result();
}
Answer
Solution:
{
$q= $this->db->from('purchase')
->group_start()
->like('item_name',$query)
->or_like('item_code',$query)
->group_end()
//you can other conditions here.
->get();
return $q->result();
}
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: the process class relies on proc_open, which is not available on your php installation.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.