I had a feeling that there was going to be an "easier" way to do
things.

The problem is, is that I'm not aware of any way to specify the
table's name. The below code still returns "No Database table for
model Book (expected "books"), create it first.", as the table is
called "bib", rather than "books", as the framework is expecting.

Cory

On Sep 27, 2:00 pm, robechar <[EMAIL PROTECTED]> wrote:
> So to directly answer your question, in you getBibNum() function, I
> would use the built in field() function instead of query() and pass it
> some conditions:
>
>       function getBibNum($isbn)
>         {
>                 $conditions = array("`Book`.`tag`='020'",
>                                              "`Book`.`text` LIKE '%
> {$isbn}%'");
>                 return $this->field('bib_number', $conditions);
>         }


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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