calling a method is case sensitive:
function getIdAliasArray()
you were probably calling "getidaliasarray" instead of
"getIdAliasArray" as mentionned into the Sql message. If you call a
method for a model that does not exists, it seem to be passed to Sql,
and this is why you see this message.
hope this help
On Aug 1, 10:52 pm, starkey <[EMAIL PROTECTED]> wrote:
> Odd, I moved it to my controller and it worked fine... Can someone
> explain why? Thanks!
>
> function add()
> {
> $selectBoxData = $this->Aro->findAll(null,array('id','alias'),'alias
> ASC',null,1,0);
>
> ...
> }
>
> On Aug 1, 4:46 pm, starkey <[EMAIL PROTECTED]> wrote:
>
> > Okay, I'm sure I'm really showing my noobie stripes with this one...
>
> > As a learning exercise I'm creating a front end for ACL.
>
> > Instead of using generateList to populate a selectTag I thought I'd
> > try a custom query by adding a method to my model and call it from the
> > controller. Here is the method:
>
> > function getIdAliasArray()
> > {
> > $arr = $this->findAll(null,array('id','alias'),'alias ASC');
> > return($arr);
> > }
>
> > Well, this causes an error because it tries to run "getidaliasarray"
> > as if it were an SQL query instead of a method name. Here is the
> > error:
> > Query: getidaliasarray
> > 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 'getidaliasarray' at line...
>
> > I even set DEBUG to 2 and it pumped out "getidaliasarray" along with
> > all of the other queries.
>
> > What am I doing wrong here?
>
> > Thanks!
> > Shawn
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---