Re: set_sql, can't locate object method...

[prev] [thread] [next] [Date index for 2004/09/09]

From: Michael Jensen
Subject: Re: set_sql, can't locate object method...
Date: 04:50 on 09 Sep 2004
Fantastic! That did the trick. I guess I glanced over that sentence... 
:)

-Michael


On Sep 8, 2004, at 11:44 PM, I Can Hear Machinery wrote:

>> 31	Table::Users->set_sql(team_list => qq{select u.* from users 
>> u,typist_team_members ttm where (u.id=ttm.typist_id and 
>> ttm.team_id=$team_id) order by u.last_name});
>> 32	my @userListing = Table::Users->team_list;
>>
>>
>> I am trying to use set_sql but I get this error:
>>
>> Can't locate object method "team_list" via package "Table::Users" at 
>> /home/webtree/home/www.acutext.com/html/i/userListing.html line 31.
>>
>> Any idea what is going on? I have my code as exact to the examples as 
>> I can think, and the sql does work fine on its own.
>
> The name of the method is search_team_list not just team_list...
>
>        We also extend the Ima::DBI set_sql() to create a helper 
> shortcut
>        method, named by prefixing the name of your SQL fragment with 
> search_.
>        Thus, the above call to set_sql() will automatically set up the 
> method
>        Music::CD->search_new_music(), which will execute this search 
> and
>        return the relevant objects or Iterator.  (If you have 
> placeholders in
>        your query, you must pass the relevant arguments when calling 
> your
>        search method.)
>
> -- 
> Aneel Nazareth -- http://eye-of-newt.com/nazareth --
>


set_sql, can't locate object method...
Michael Jensen 04:34 on 09 Sep 2004

Re: set_sql, can't locate object method...
Michael Jensen 04:50 on 09 Sep 2004

Re: set_sql, can't locate object method...
Jason Galea 04:56 on 09 Sep 2004

Generated at 11:35 on 01 Dec 2004 by mariachi v0.52