Question about conditions. I am updating a <DIV> using Ajax, I have
Configure::write('debug', 2); so I can see what is being requested from the
database. Now when I update the info -> save I see 25 queries yet the
element I was updating is independent of any of the queries being run.
I am updating info in the USER profile (checkboxes) but the info being
updated is their ARTISTS checkbox selection. Yet the query returns queries
from AUTHORS, USER, ARTISTS, BIO tables and so on.... Is that normal? I
thought it should only query the tables used in the update.
CONTROLLER CODE:
function update_artists($slug = null)
{
if ($this->RequestHandler->isAjax()) {
$this->set('user', $this->User->findBySlug($slug));
if (!empty($this->data)) {
if ($this->User->save($this->data)) {
$this->view_artists($slug);
}
}
$artists= $this->User->Artist->find('list', array('fields' =>
artists, 'order' => artists ASC'));
$this->set(compact(artists));
}
if (empty($this->data)) {
$this->data = $this->User->findBySlug($slug);
}
}
How can I set it so it only queries the tables that are relevant?
Thanks,
Dave
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---