I am building an app to track my reading list. I have a Book table
(id, title, author) and a Queue table (book_id, position), with a
model set up for each table.

When I try to remove a book from the queue, using this code in my
controller:

$this->Queue->del($book_id)

the delete fails because the del() function calls findcount() on the
Queue table, which leads to a SQL error because Queue.id is not a
field in the Queue table.

SELECT COUNT(*) AS count FROM `queue` AS `Queue` WHERE `Queue`.`id` =
2

Is there a way around this findcount() behavior? Can I tell the Queue
model to use 'book_id' instead of 'id' when doing a findcount() [I
tried setting $id to 'book_id' in the Queue model]? Am I just doing it
all wrong?

Thanks,

Bil H.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to