Setting |
Fatal error: Call to a member function result() on boolean in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\companygiondaci\application\models\Mpages.php on line 197
A PHP Error was encountered Severity: Error Message: Call to a member function result() on boolean Filename: models/Mpages.php Line Number: 197 Backtrace: Line 197: //return $query->result(); return $query->result_array(); I would like to update setting data: models/Mpages.php PHP Code: public function add_settings() controllers/Cpages.php PHP Code: public function settings() { views/settings.php PHP Code: <?php echo $success_message; ?>
" If I looks more intelligence please increase my reputation."
Fatal error: Call to a member function result_array() on boolean in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\companygiondaci\application\models\Mpages.php on line 198
A PHP Error was encountered Severity: Error Message: Call to a member function result_array() on boolean Filename: models/Mpages.php Line Number: 198 Backtrace: Line 198: return $query->result_array(); Similar error still appears: models/Mpages.php PHP Code: public function add_settings()
" If I looks more intelligence please increase my reputation."
A more specific user guide reference ... http://www.codeigniter.com/user_guide/da...r::replace
query->replace(...) returns a boolean. This was obvious in your original post ... the error message on the very first line.
Fatal error: Call to a member function replace() on boolean in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\companygiondaci\application\models\Mpages.php on line 199
A PHP Error was encountered Severity: Error Message: Call to a member function replace() on boolean Filename: models/Mpages.php Line Number: 199 Backtrace: Line 199: return $query->replace();
" If I looks more intelligence please increase my reputation."
PHP Code: public function update_settings($id) { Then use a separate model function to get the data
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
All query that change the data in a table return the result of the operation not the data.
To solve your issue you need something like this PHP Code: $result = $this->db->update('setting', $data); A good decision is based on knowledge and not on numbers. - Plato
|
Welcome Guest, Not a member yet? Register Sign In |