Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isValid($id = null){
- $this->db->select('id');
- $this->db->from('products');
- // join on user_id = this->user->id
- $this->db->where('id', $id);
- $query = $this->db->get();
- if($query->num_rows == 0)
- {
- return FALSE;
- }
- else
- {
- return TRUE;
- }
- }
Add Comment
Please, Sign In to add comment