[ic] simple query problem

ic at 3edge.com ic at 3edge.com
Thu Jul 19 17:02:42 EDT 2007


> On Jul 19, 2007, at 2:04 PM, mail wrote:
> 
> > Hi,
> >
> > I seem to have a problem with my [query] tag
> >
> > here is is:
> >
> > [query
> >   type=list
> >   label=leftmenu
> >   prefix=collections
> >   list_prefix=collections_list
> >   table=collections
> >   ml=none
> >   sql=|
> > SELECT * FROM `collections`
> > WHERE `prod_group` = Jewelry
> > AND `pending` != 1
> > AND `nla` != 1
> > AND `inactive` != 1
> > |]
> >
> > and here is my error log:
> >
> > 216.114.142.43 N282FRxe:duprat duprat [19/July/2007:13:56:55 -0400]
> > dd /cgi/dd/jewelry.html Query on table `collections` failed: Can't
> > call
> > method "config" on an undefined value
> > at /usr/local/interchange-5.4.2/lib/Vend/Table/DBI.pm line 1987.
> >>
> >> Query was: SELECT * FROM `collections`
> >> WHERE `prod_group` = Jewelry
> >> AND `pending` != 1
> >> AND `nla` != 1
> >> AND `inactive` != 1
> >
> >
> > It was a [search-region] and it worked fine, however, I need to use
> it
> > on my results page, and so I changed it from a search-region to a
> > query.
> >
> > Does anybody know what the problem might be?
> There was just a post about not using "!=" but using "<>" as your
> inequality operator.

In this case it was not the "!=" causing the problem. That only occurs if
you are not having a db such as MySQL or Postgres on the backend to handle
the query and it has to go through SQL_Parser.pm  ...  

However it would be a good idea to just use "<>", that way you are more
flexible in the future about the database things will run on.

CU,

Gert



More information about the interchange-users mailing list