On Wed, Sep 9, 2009 at 6:19 AM, Dismankler <[email protected]> wrote:
>
> Hopefully it will be simple for one of you to help me.
> I was following the steps in the Todo list tutorial from Cakephp
> novice to professional and i am getting stuck along the way.
>
> .
> 1)Firstly i created my database
>
> CREATE TABLE IF NOT EXISTS `item` (
> `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
> `name` varchar(255) NOT NULL,
> `date` datetime NOT NULL,
> `priority` int(2) NOT NULL,
> `completed` tinyint(1) NOT NULL,
> PRIMARY KEY (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
>
>
> 2)i then created my model and just placed one variable i.e
>
> class Item extends AppModel {
> var $name = 'item';
That should be uppercase:
var $name = 'Item';
> saved it in the models directory as item.php
>
> 3)I created the controller
> class ItemsController extends AppController {
> var $name = 'Items';
> var $scaffold;
> }
> and also saved it as items_controller.php
>
> IT IS FROM THIS POINT THAT I GET STUCK AND NOT SURE WHERE TO CREATE
> THE VIEW AND SEE THE ACTUAL PAGE WITH THE SCAFOLLED DATA.WHAT MUST I
> DO FOR A PAGE TO DISPLAY ME THE DATA FROM MY DATABASE.PLEASE HELP ?
>
Your view files should go in app/views/items/
You can use bake to create basic views for you.
cake bake view Items
Do that, look at the results, and then modify the HTML in the view
file however you see fit.
http://cakebaker.42dh.com/2007/06/11/baking-views/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---