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
-~----------~----~----~----~------~----~------~--~---