[ic] complex sql select statements

Mike Heins interchange-users@icdevgroup.org
Tue Sep 10 12:07:00 2002


Quoting John Allman (allmanj@houseofireland.com):
 >>
> >>192.168.0.145 G6A6upoU:192.168.0.145 - [10/September/2002:10:41:22 
> >>+0100] wat /cgi-bin/wat/subcatcompl.html Bad SQL statement: Parse error 
> >>near left outer join products on cattable.featprod=products.sku where 
> >>pcode=252 order by cattable.displorder at 
> >>//usr/lib/interchange/lib/Vend/Scan.pm line 580.
> >>    
> >>
> >
> >I can almost guarantee you need a base=cattable in your [query ...]
> >tag. 
> >
> i added in base=cattable in the query tag and i still get errors 
> generated. my post in the nuttyness thread also has base=cattable and it 
> has made no difference.
> 
> can you think of anything else it might be?

Maybe "table=cattable"? I thought there was an attrAlias there, but maybe
not.

Only that it is really an invalid query, and the reason you get the error pointing
to Scan.pm is that it fails in $db->query(). I use this same methodology
in several places, and if your query/check_orders page works you know it
is OK in your install.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

For a successful technology, reality must take precedence over public
relations, for Nature cannot be fooled. -- Dick Feynman