Sunday, December 29, 2013

[Codeigniter][solved] You must use the "set" method to update an entry.

According to DB_active_rec.php, 
if there is nothing in $this->ar_set, (count($this->ar_set) == 0)
and if $db['default']['db_debug'] \application\config\database.php in is TRUE, 
will display this message:

The Error Message :
A Database Error Occurred
You must use the "set" method to update an entry.
Filename: /home/content/11/10764211/html/projects/plantonichk/models/md_edit.php
Line Number: 13


 To stop the error , you need go to you config folder in your application directory to turn
\application\config\database.php
and edit the db_debug value From TRUE to FALSE,
so that can turn off the Database debug mode:


From
$db['default']['db_debug'] = TRUE;
To
$db['default']['db_debug'] = FALSE;

then you won't show the error message, however,
the problem was still here.

And then i check up why count($this->ar_set) == 0 in my case.
found I have insert nothing into a table
Related SQL made by CI :
(INSERT INTO p_photo () VALUES (); )
so maybe next steps is tried look for the way to fix the SQL problem ..

No comments :

Post a Comment