×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Dylan Lopez
Added: Mar 30, 2018 3:30 AM
Modified: Mar 30, 2018 3:39 AM
Views: 3
  1. $query = $this->db->get_where($table_name, array('id' => $id), 1);
  2. $total_rows = $query->num_rows();
  3. if ( $total_rows == 0 ){//exist
  4.  
  5. }
  6. else {//not exist
  7.  
  8. }