CodeIgniter Forums
how to update values in database - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: how to update values in database (/showthread.php?tid=66302)



how to update values in database - sheenam - 10-06-2016

I am new to CI and presently using CI-3 with PHP7.0 on a win7 PC
I am getting error as below:
You must use the "set" method to update an entry.
Filename: C:\xampp\htdocs\CRM(20-09-16)\system\database\DB_active_rec.php
Line Number: 1272

Please help me here...


RE: how to update values in database - dbrooke - 10-06-2016

What is your code at line 1272 of the DB_active_rec.php file?

As a side note, not sure it's a good idea to use parentheses in a directory name.


RE: how to update values in database - salain - 10-06-2016

Hi,

You should include some code it would be easier to see what is wrong.
But from the error message it seams like there is something wrong with the way you pass the data to the update method

Also, not 100% sure but I think DB_active_rec.php is the old (CI ver 2).
In CI 3 it is some thing like DB_query_builder.php.


RE: how to update values in database - sheenam - 10-07-2016

(10-06-2016, 11:10 AM)dbrooke Wrote: What is your code at line 1272 of the DB_active_rec.php file?

As a side note, not sure it's a good idea to use parentheses in a directory name.

Thank you dbooke !!

I found the solution and now I am able to update and delete the values too.
My new issue is that when I press the update / delete, a new page opens up with an error given below:

A Database Error Occurred

Error Number: 1096
No tables used
SELECT *
Filename: C:\xampp\htdocs\CRM(20-09-16)\system\database\DB_driver.php
Line Number: 328

BUT, when I close this error page and press refresh on my earlier page, wherein I had put the update / delete, I am able to see the updated / deleted value

Kindly advise


RE: how to update values in database - InsiteFX - 10-07-2016

It sounds like you did not follow the upgrade info for CI version 3+

QueryBuilder is the new one.

I would re-check your installation of CodeIgniter 3+