How i create common save/update/delete operations in one base class in php? -


how create common save/update/delete operations in 1 base class or model in core php example.there 27 table in database.thanks in advance.

create class

class dbcontroller {  private $host;  .....  private $conn  function __constuct(){   $this->$conn = new mysqli($host,....); }  // save operation   function insertquery($sql){   $check=$this->conn->query($sql);   other check    }  function updatequery($sql){   $check=$this->conn->query($sql);   other checks..    } } 

now include class in required files , make instance of , call "select query" function on insertion , forth


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -