×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Dylan Lopez
Added: Apr 6, 2018 5:08 AM
Modified: Apr 7, 2018 1:29 PM
Views: 2
  1. $query = $this->db->query('SELECT `id` FROM 'my_table' WHERE `id` = $id LIMIT 1');
  2. $row = $query->row_array();
  3. if ($row != NULL){
  4.         //exist
  5. } else {
  6.         //not exist
  7. }