Hello Samuel
Thanks for that tip. I Capitalized it as you noted, and I still have
the same issue. Any other ideas as to why there are warnings with the
Cake libraries? Could it be a PHP setup issue on my end?
Thanks,
Yasir
On Feb 5, 6:30 am, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> Try
>
> var $name = "Hotel"; // <-- note that this is capitalized
>
> On 2/4/07, yshah <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hey all! I'm trying out CakePHP for the first time and wanted to try
> > out scaffold like in Ruby.
>
> > I setup the database:
>
> > var $default = array('driver' => 'mysql',
> > 'connect'
> > => 'mysql_connect',
> > 'host' =>
> > 'localhost',
> > 'login' =>
> > 'bsg',
> > 'password'
> > => 'camelZ711',
> > 'database'
> > => 'bsg',
> > 'prefix' =>
> > '');
>
> > I created the following controller:
>
> > <?php
> > class HotelsController extends AppController
> > {
> > public $name = "hotels";
> > var $scaffold;
> > var $useDbConfig = "default";
> > }
> > ?>
>
> > Then the following model:
>
> > <?php
> > class Hotel extends AppModel {
> > var $name = 'hotel';
> > }
> > ?>
>
> > After that I hit the page /hotelRez/app/Hotels and get the following
> > preceding the normal CakePHP Rapid Development layout:
>
> > Warning: Invalid argument supplied for foreach() in /users/home/bsg/
> > web/public/hotelRez/cake/libs/model/dbo/dbo_mysql.php on line 171
>
> > Warning: Invalid argument supplied for foreach() in /users/home/bsg/
> > web/public/hotelRez/cake/libs/model/dbo/dbo_mysql.php on line 171
>
> > Warning: Invalid argument supplied for foreach() in /users/home/bsg/
> > web/public/hotelRez/cake/libs/controller/controller.php on line 646
>
> > Warning: Invalid argument supplied for foreach() in /users/home/bsg/
> > web/public/hotelRez/cake/libs/model/datasources/dbo_source.php on line
> > 1222
>
> > Notice: Uninitialized string offset: 0 in /users/home/bsg/web/public/
> > hotelRez/cake/libs/model/datasources/dbo_source.php on line 1230
>
> > Any ideas as to what I did wrong? Bad Connection? What am I doing
> > wrong?
>
> > Thanks in advance!
>
> --
> ==
> S. DeVore
> (the old fart) the advice is free, the lack of crankiness will cost you
>
> - its a fine line between a real question and an idiot
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---