php - codeigniter extend database driver call to undefined method my_db_mysql_driver::select() -



php - codeigniter extend database driver call to undefined method my_db_mysql_driver::select() -

in codeigniter, need custom active record class can grouping clauses. upon stumbling found this , tutorial on how extend mysql driver. upon doing so, receive error of fatal error: phone call undefined method my_db_mysql_driver::select(). have followed steps stated on tutorial still no luck.

here's sql statement:

$this->db->select('post_id, post_title'); $this->db->from('articles'); $this->db->where($sqlparams); $this->db->open_bracket(); $this->db->or_like($sqllikeparams); $this->db->close_bracket();

your custom active record class must extends ci_model

class active_record extends ci_model { function __construct() { parent::__construct(); } function your_function() { /* code here*/ $this->db->select('post_id, post_title'); $this->db->from('articles'); $this->db->where($sqlparams); $this->db->open_bracket(); $this->db->or_like($sqllikeparams); $this->db->close_bracket(); } }

php mysql database codeigniter

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -