There are a lot of chages between cake 1.1 and 1.2. IBM tutorials was
written for 1.1

On Aug 22, 11:34 pm, winegoddess <winegodd...@gmail.com> wrote:
> THANK YOU!!!!!!
>
> Im surprised I couldnt find anything correcting the tutorial on this.
>
> THANK YOU!!!
>
> Judy
>
> On Aug 21, 6:41 pm, Sam Sherlock <sam.sherl...@gmail.com> wrote:
>
>
>
> > no longer findAll use find('all')http://book.cakephp.org/view/449/find
> > - S
>
> > 2009/8/21 winegoddess <winegodd...@gmail.com>
>
> > > Hello, I am not sure why my messages are not getting through.
>
> > > I have a question regarding the IBM tutorial
>
> > >http://www.ibm.com/developerworks/opensource/tutorials/os-php-cake2/s...
>
> > > My knownusers page is not working.
> > > I get a message that
> > > The first argument should be an array [APP\views\users\knownusers.ctp,
> > > line 3]
>
> > > I have several records in the users table.
>
> > > Here are my files:
>
> > > VIEW (knownusers.ctp)
> > > <table>
> > > <?php echo $html->tableHeaders(array_keys($knownusers[0]['User']));
> > > foreach ($knownusers as $thisuser){
> > >  echo $html->tableCells($thisuser['User']);
> > > }
>
> > > ?>
> > > </table>
>
> > > MODEL:
>
> > > <?php
> > > class User extends AppModel
> > > {
> > >        var $name = 'User';
>
> > >         var $validate = array(
> > >                'first_name' => array(
>
> > >                                 'ruleName2' => array(
> > >                                                 'rule' => 'alphaNumeric',
> > >                                                 'required' => true,
> > >                                                 'message' => 'You must
> > > enter a first name using letters only.'
> > >                                                )
> > >                         ),
>
> > >                'last_name' => array(
> > >                                'ruleName' => array(
> > >                                        'rule' => '/^.{1,40}$/',
> > >                                                 'message' => 'Please enter
> > > a first name between 1 and 40
> > > characters.'
> > >                                                        ),
> > >                                'ruleName2' => array(
> > >                                         'rule' => 'alphaNumeric',
> > >                                         'required' => true,
> > >                                         'message' => 'You must enter a
> > > first name.'
> > >                                                )
>
> > >                        ),
> > >           'username' => array(
> > >                         'ruleName' => array(
> > >                         'rule' => '/^.{6,40}$/',
> > >                                                 'message' => 'Please enter
> > > a username between 6 and 40
> > > characters.'
> > >                                                        ),
> > >                         'ruleName2' => array(
> > >                         'rule' => 'isUnique',
> > >                                                'message' => 'This username
> > > has already been taken.'
> > >                                                )
> > >                         ),
>
> > >                   'password' => array (
> > >                                                'rule' => '/^.{6,40}$/',
> > >                                                 'message' => 'Please enter
> > > a password between 6 and 40
> > > characters.'
> > >                                                        ),
> > >                    'email' => array('rule' => 'email',
> > >                                                         'message' =>
> > > 'Please enter a valid email address.'
> > >                                                        ),
>
> > >                  );
>
> > > }
> > > ?>
>
> > > CONTROLLER  (truncated)
>
> > > <?php
> > > class UsersController extends AppController
> > > {
>
> > > var $name = 'Users';
>
> > > var $helpers = array('Html', 'Form' );
>
> > > .
> > > .
> > > .
>
> > >  function knownusers()
> > >    {
> > > $this->set('knownusers', $this->User->findAll(null,
> > >                array('id', 'username', 'first_name', 'last_name'), 'id
> > > DESC') ) ;
> > >    }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to