Skip to content
Advertisement

Update specific row using codeigniter?

I am trying to update specific row of table in codeigniter. But my code update all rows.

Model:

JavaScript

Controller:

JavaScript

And in new page it show the echo value 1. How to update specific row? why $query->num_rows() return 1 and update all rows?

Advertisement

Answer

Try using a where condition to update a specific record

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement