$data['entry'] = DB::select()->from('mini_lists')->execute()->get();
$data['entry'] = DB::query('SELECT * FROM mini_lists');
Fuel\Core\Fuel_Exception [ Error ]: Database results are read-only
namespace Books; class Controller_Books extends \Controller { public function action_index() { $data = array(); $data['result'] = Model_Books::books_all(); $this->response->body = \View::factory('welcome/index', $data); }The model works by itself and if I run the query directly on the controller, it does too. But I doesn't pass the "->execute()" result to the "$data" array. Here's the model:
namespace Books; class Model_Books extends \Model { public static function books_all() { $result = \DB::select()->from('books')->execute(); return $result; }
$this->record = \DB::select()->where('id', '=', $value)->from($table)->execute();
Harro Verton wrote on Thursday 7th of April 2011:There is no get() in executing a query:
$this->record = \DB::select()->where('id', '=', $value)->from($table)->execute();
Fuel\Core\Fuel_Exception [ Error ]: Database results are read-only
$data['entry'] = DB::select()->where('list_id', '=', '1')->from('mini_lists')->execute()->as_array();
It looks like you're new here. If you want to get involved, click one of these buttons!