Wednesday, December 29, 2010

Re: Problems Creating Shells (Tutorial)

Do you have a model called Order and a database table called orders?
And if you do, does your table have the fields the error message says
are missing. The tutorial doesn't say (but maybe it should this stuff
needs to exist).

On Dec 29, 12:36 pm, john lyles <confidentia...@gmail.com> wrote:
> Is your app called 'app' ? Also if you do only the first step of the
> tutorial, this part,
> <?php class ReportShell extends Shell {    function main() {}}?>
> and then do: cake report, what happens then?
>
> On Dec 29, 11:33 am, John Maxim <goog...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I'm suspecting something's wrong with my paths:
> > ~~~
> > ♀
> > Welcome to CakePHP v1.3.6 Console
> > ---------------------------------------------------------------
> > Current Paths:
> >  -app: app
> >  -working: C:\wamp\www\cakephp\app
> >  -root: C:\wamp\www\cakephp
> >  -core: C:\wamp\www\cakephp
>
> > Changing Paths:
> > your working path should be the same as your application path
> > to change your path use the '-app' param.
> > Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp
>
> > Available Shells:
> >  acl [CORE]                              i18n [CORE]
> >  api [CORE]                              report [app]
> >  bake [CORE]                             schema [CORE]
> >  console [CORE]                          testsuite [CORE]
>
> > To run a command, type 'cake shell_name [args]'
> > To get help on a specific command, type 'cake shell_name help'
>
> > C:\wamp\www\cakephp>
> > ~~
> > The cakephp is my root. I read we got to make the application and
> > working path be the same, I don't understand from the turorial in
> > cookbook, can someone point the correction so I may fix it?
>
> > Thanks,
> > Maxim
>
> > On Dec 30, 12:23 am, John Maxim <goog...@gmail.com> wrote:
>
> > >http://book.cakephp.org/view/1107/Creating-Shells-Tasks
>
> > > Hi,
> > > While going through the tutorial above, as I run
>
> > > >cake report
>
> > > Error: Missing database table 'orders' for model 'Order'
>
> > > -----------------
> > > Do we need to create one ? I created one but just to find out more
> > > errors after running the second time
>
> > > >cake report
>
> > > ------------
> > > PHP Warning:SQL Error: 1054: Unknown column 'Order.shipped' in 'where
> > > clause'</span> in C:\wamp\www\cakephp\cake\libs\model\datasources
> > > \dbo_source.php on line 684
>
> > > Warning: <b>SQL Error:</b> 1054: Unknown column 'Order.shipped' in
> > > 'where clause'</span> in C:\wamp\www\cakephp\cake\libs\model
> > > \datasources\dbo_source.php on line 684
> > > <pre><p style="text-align:left"><b>Query:</b> SELECT
> > > `Order`.`order_date`, `Order`.`amount` FROM `orders` AS `Order`
> > > WHERE `Order`.`shipped` >= '2010-11-29 16:13:53'    </p></pre>PHP
> > > Warning:  Invalid argument supplied for foreach() in C:\wamp\www
> > > \cakephp\app\vendors\shells\report.php on line 10
>
> > > Warning: Invalid argument supplied for foreach() in C:\wamp\www\cakephp
> > > \app\vendors\shells\report.php on line 10
> > > PHP Notice:  Undefined variable: total in C:\wamp\www\cakephp\app
> > > \vendors\shells\report.php on line 19
>
> > > Notice: Undefined variable: total in C:\wamp\www\cakephp\app\vendors
> > > \shells\report.php on line 19
> > > Total: $0.00
>
> > > -------------
>
> > > Is my console set up correctly ? something I left out ?
>
> > > Thanks,
> > > Maxim

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: