Hi there,
I am new to cake and I have several questions. :)
>From the blog tutorial:
1)
<?php
//AppModel gives you all of Cake's Model functionality
class Post extends AppModel
{
// Its always good practice to include this variable.
var $name = 'Post';
Is this var ($name) mandatory? In view, I have <?php echo $row['Post']
['id']; ?>. Does ['Post'] here refer to the $name var?
2) In the controller, I have $this->set('posts',$this->Post-
>findAll());
Where does this 'posts' come from? Does the Post in $this->Post refer
to the data model named Post or the var $name with name Post?
3)
In view, I have <?php echo $row['Post']['id']; ?>
The question is the same, does the Post here refer to the data model
named Post or the var $name with name Post?
Thanks a lot
Ming
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---