/** * Constructor creating a PDO object connecting to a choosen database. * * @param array $options containing details for connecting to the database. * * @return void */ public function __construct($options = []) { parent::__construct($options); parent::connect(); }
/** * Insert a record in the database. * * @param array with the column names where the values is to be inserted * @param array with the values * * @return boolean TRUE on success, FALSE on failure */ public function insertRecord($columns, $values) { $this->createTableIfNotExists(); parent::insert($this->table, $columns, $values); return $this->execute(); }
/** * Constructor needed to call parent constructor. * * @return void * */ public function __construct() { parent::__construct(); }