Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: user6d450
Added: May 9, 2019 11:08 PM
Views: 3
Tags: no tags
  1.   public function validateNewsId(){
  2.        
  3.         $this->db->query("SELECT newscenter_id FROM newscenter WHERE newscenter_id = '$this->newscenter_id'");
  4.         $this->db->execute();
  5.         if($this->db->rowCount() == 0){
  6.            
  7.             $this->sendMessage('error','E242');
  8.         }
  9.     }
  10.    
  11.     public function setNewsId($newscenter_id){
  12.        
  13.         $this->newscenter_id       = $newscenter_id;
  14.        
  15.         $this->validateNewsId();
  16.     }