Quantcast
Channel: Cakephp: Update records without refering the primary key - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Farray for Cakephp: Update records without refering the primary key

saveField is only intended to work on the currently loaded record. To update multiple records of the same model, use updateAll.Usage:Model::updateAll(array $fields, array $conditions)Updates many...

View Article


Answer by Saanch for Cakephp: Update records without refering the primary key

Your id_thred field doesn't seems to be unique. So even if you make a SQL query to update the data, it will update the two rows. is this what yo are expecting? My suggestion would be call a find method...

View Article


Cakephp: Update records without refering the primary key

I am trying to update number of records with respect to their thread Id. Here is a problem my id_thread field is not a primary key . But as far as I know cakephp only supporting updating content...

View Article
Browsing latest articles
Browse All 3 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>