That's the way I would do it too :(
I guess there are to solutions - you could make BadWords a component
instead of a behavior and use multiple models that way, the other
would be to store your bad-words in an array, rather than calling them
from the database. You could even move it into the config file for
easier editing.
Zoltan
www.yyztech.ca
On Oct 8, 12:28 pm, Braindead <[EMAIL PROTECTED]> wrote:
> I'm trying to write a badword behavior for my guestbook, where a
> guestbook entry has to be verified when one or more badwords are
> detected inside the guestbook entry. My badwords are stored in a
> database. The problem is how to query the badwords, when the current
> model is the guestbook?
>
> Is the only possibility something like
>
> $badwords = $model->query('SELECT `entry` FROM `badwords` ORDER BY
> `entry`');
>
> or is there a more "cake-like" way?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---