Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Dylan Lopez
Added: Mar 5, 2018 9:04 AM
Views: 7
  1. $sql = "SELECT * FROM $table_name WHERE `URL` = '$src_url' ";
  2. $query = $this->db->query($sql);
  3. $num_rows = $query->num_rows();
  4.  
  5. if ($num_rows == 0){
  6.     //Not exist, Insert
  7.     echo "Not exist";
  8. } else {echo "Record is exist " . "<br>";}