I been using debug(); all over my controller action to see where these queries are coming from.
I have an element that gets loaded into a div on the page (7 queries) ,that element has "edit" Ajax update link that loads a Ajax form in its place ... (15 queries) click 'save' and presto 94 queries.
I have debug 2 so i can see all the Ajax queries. After i save the User info for the form the SQL shows all the HABTM tables hasMany, belongsTo.
Where i cant figure it out is the save is just
if (!empty($this->data)) {
$san = new Sanitize();
// Sanitize the input of items we do not know what the end user put in.
$this->data = $san->clean($this->data);
if ($this->User->save($this->data)) {
$this->skills($model); //this simply returns back to the original element when there were 7 queries to start with but when the element is returned with the updated changes it has 94 queries
}
}
$san = new Sanitize();
// Sanitize the input of items we do not know what the end user put in.
$this->data = $san->clean($this->data);
if ($this->User->save($this->data)) {
$this->skills($model); //this simply returns back to the original element when there were 7 queries to start with but when the element is returned with the updated changes it has 94 queries
}
}
Any ideas why the sudden added queries?
Dave
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment