php - Codeigniter - Model, checking that values are in row
Get the solution ↓↓↓Solution:
You can just do the matching in query itself:
$this->db->where(array('id' => $id,'title'=>$title,'category'=>$category));
$query = $this->db->get('news');
if ($query->num_rows() > 0){
return true;
}
else{
return false;
}
Answer
Solution:
if ($data['category'] == $category && $data['title']==$title)
{
return TRUE;
}
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: xmlhttprequest error flutter
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.