[ic] Difficulties grabbing sql data within perl tags.

Stefan Hornburg racke at linuxia.de
Wed Jan 5 07:19:59 EST 2005


On Wed, 5 Jan 2005 12:52:01 +0100
Davor Ocelic <docelic at mail.inet.hr> wrote:

> 
> On Wed, 5 Jan 2005 19:02:41 +0800
> "Cameron G" <ritontor at icenet.com.au> wrote:
> 
> > > > > On Wed, 5 Jan 2005 17:14:41 +0800
> > > > > "Cameron G" <ritontor at icenet.com.au> wrote:
> > > > >
> > > > > > I'm positive I'm missing something terribly obvious here, but 
> > > > > > right now I'm stumped. All I'm trying to do is hack the 
> > > Detailed 
> > > > > > reports page to display a list of the item descriptions 
> > > that were
> > > > > purchased -
> > > > > > seemingly a simple task, merely a query that says "select
> > > > > description
> > > > > > from orderline where order_number = 'the order number'".
> 
> > > > > >  my $results = $Tag->query( { sql => $ordersql, } 
> 
> > > > > Use [perl tables="products store orderline"] or set the base 
> > > > > attribute for query to orderline.
> 
> > > Cameron, have you tried setting the base attribute for the 
> > > query tag to orderline as Racke proposed?
> > > E.g. add to query tag:
> > > base='orderline'
> 
> Isn't his problem that he is using $Tag->query() instead of
> 
>   $Db{products}->query({ sql => $ordersql })  ?

This appears to be a reasonable objection. Cameron, please try

$Db{orderline}->query({ sql => $ordersql })

Ciao
	Racke



-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team



More information about the interchange-users mailing list