set_sql, can't locate object method...

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

From: Michael Jensen
Subject: set_sql, can't locate object method...
Date: 04:34 on 09 Sep 2004
--Apple-Mail-13-433173269
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

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.

MySQL, Perl 5.8.0, Apache, Mason, FreeBSD

Nothing out of the ordinary in my base class:

...
Table::Users->table('users');
Table::Users->columns(Primary => qw/id/);
Table::Users->columns(Others => qw/username password group_id 
create_date edit_date first_name last_name company_id email phone fax 
plan_type plan_limit last_login_date msg_email/);
Table::Users->has_a(group_id=>'Table::Groups');
Table::Users->has_a(company_id=>'Table::Companies');
Table::Users->add_trigger(before_create => sub { $_[0]->set(create_date 
=> $time) });
1;


Thanks! Any help is appreciated!

-Michael Jensen
--Apple-Mail-13-433173269
Content-Transfer-Encoding: 7bit
Content-Type: text/enriched;
	charset=US-ASCII

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:


<fontfamily><param>Verdana</param><smaller>Can't locate object method
"team_list" via package "Table::Users" at
/home/webtree/home/www.acutext.com/html/i/userListing.html line 31.

</smaller></fontfamily>

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.


MySQL, Perl 5.8.0, Apache, Mason, FreeBSD


Nothing out of the ordinary in my base class:


...

Table::Users->table('users');

Table::Users->columns(Primary => qw/id/);

Table::Users->columns(Others => qw/username password group_id
create_date edit_date first_name last_name company_id email phone fax
plan_type plan_limit last_login_date msg_email/);

Table::Users->has_a(group_id=>'Table::Groups');

Table::Users->has_a(company_id=>'Table::Companies');

Table::Users->add_trigger(before_create => sub {
$_[0]->set(create_date => $time) });

1;



Thanks! Any help is appreciated!


-Michael Jensen
--Apple-Mail-13-433173269--


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