CodeIgniter Forums
Limiting an update or delete with active record? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Limiting an update or delete with active record? (/showthread.php?tid=13752)



Limiting an update or delete with active record? - El Forum - 12-04-2008

[eluser]ryeguy[/eluser]
Is it possible to use ->limit(x) on an update or delete? It doesn't seem to be working. Is there some workaround other than writing the query manually?


Limiting an update or delete with active record? - El Forum - 12-08-2008

[eluser]Jon L[/eluser]
What version of CI are you using? I know for a fact it's supported in SVN


Limiting an update or delete with active record? - El Forum - 12-08-2008

[eluser]Bl4cKWid0w[/eluser]
You could just use where. If you're calling a record by an auto-incremented ID, there should only be one result.


Limiting an update or delete with active record? - El Forum - 06-15-2009

[eluser]LeopoldoVettor[/eluser]
Yes it´s possible, either update or delete methods in ActiveRecord pattern are working on version 1.7.
Enjoy