Welcome Guest, Not a member yet? Register   Sign In
Wildfire - Yet another wrapper for Query Builder
#5

PHP Code:
$this->load->model('post');

$query $this->db->query('SELECT * FROM post');

// Instantiate Wildfire with the database class and the query
$wildfire = new Rougin\Wildfire\Wildfire($this->db$query);

// Returns an array of Post objects with a User object per Post object
$posts $wildfire->result(); 

You code is too complicated.

I am using
PHP Code:
$this->load->model('post_model');
$posts $this->post_model->where('deleted'0)->find_all(); 

or
PHP Code:
$this->load->model('post_model');
$posts $this->post_model->query_result('SELECT * FROM post where deleted = 1'); 

You addin is too fat. Other crud addins a better.
Reply


Messages In This Thread
RE: Wildfire - Yet another wrapper for Query Builder - by Paradinight - 06-05-2016, 04:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB