This error indicates you're using an old version of 1.2 or using 1.1.

Maybe you should try RC3, or look for an include paths issue if you
believe you already have RC3 installed.

Cheers,
Adam

On Nov 23, 9:52 pm, DavidH <[EMAIL PROTECTED]> wrote:
> Hi
>
> I've just installed the latest stable 1.2 version of CakePHP on my
> Ubuntu 8 server running PHP 5.2.4 and MySQL 5.0.51a.
>
> I've followed the Blog 1.2 tutorial as far as creating a model and a
> controller for a table called competitors. However now that I've the
> controller created when I run the .../competitors/index URL the model
> reports a syntax error in the SQL.
>
> Here's my model:
> [code]
> <?php
>
> class Competitor extends AppModel {
>     var $name = 'Competitor';
>
> }
>
> ?>
> [/code]
> Here's my controller:
> [code]
> <?php
> class CompetitorsController extends AppController {
>
>         var $name = 'Competitors';
>
>         function index() {
>                 $this->set('competitors', $this->Competitor->find
> ('all'));
>         }}
>
> ?>
> [/code]
>
> and here's the syntax error I get back:
>
> [code]
> Query: SELECT `Competitor`.`id`, `Competitor`.`competitor_name` FROM
> `wl_competitors` AS `Competitor` WHERE all LIMIT 1
> Warning: SQL Error: 1064: You have an error in your SQL syntax; check
> the manual that corresponds to your MySQL server version for the right
> syntax to use near 'all LIMIT 1' at line 1 in /var/www/winloss/flan/
> cake/libs/model/datasources/dbo_source.php on line 439
> [/code]
>
> Now I don't have a view defined yet; but I don't believe this is the
> cause of the problem. As the method should be finding all records it
> shouldn't be introducing a WHERE clause at all, let alone one with a
> syntax error.
>
> So what have I done wrong?
>
> Thanks
>
> David
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to