Guest User

Untitled

a guest
Jul 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. function isValid($id = null){
  2. $this->db->select('id');
  3. $this->db->from('products');
  4. // join on user_id = this->user->id
  5. $this->db->where('id', $id);
  6. $query = $this->db->get();
  7. if($query->num_rows == 0)
  8. {
  9. return FALSE;
  10. }
  11. else
  12. {
  13. return TRUE;
  14. }
  15. }
Add Comment
Please, Sign In to add comment