(1) There are several different syntaxes you can using for finding
records, including:
$this->Post->find("Post.id = {$id}");
$this->Post->find(array("Post.id" => $id));
$this->Post->findById($Id);
The first way is not recommended, since it leaves you open to SQL
injection attacks.
(2) The checkbox() method does not expect a variable name, but a
reference to a model field. For example, if you have a tinyint field
in your database called posts.is_showing, you could do the following:
$html->checkbox("Post/is_showing", "Show this post");
Then, the data would be available in the controller as
$this->data["Post"]["is_showing"].
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---