Received: from pegasus.freibergnet.de (pegasus.freibergnet.de [194.123.255.9]) by hub.org (8.9.3/8.9.3) with ESMTP id IAA25737 for ; Mon, 30 Aug 1999 08:04:58 -0400 (EDT) (envelope-from holm@pegasus.freibergnet.de) Received: (from holm@localhost) by pegasus.freibergnet.de (8.9.3/8.9.1) id OAA22748 for pgsql-sql@postgreSQL.org; Mon, 30 Aug 1999 14:04:53 +0200 (CEST) (envelope-from holm) Date: Mon, 30 Aug 1999 14:04:52 +0200 From: Holm Tiffe To: pgsql-sql@postgreSQL.org Subject: problem with select Message-ID: <19990830140452.B21897@pegasus.freibergnet.de> Reply-To: holm@freibergnet.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 0.95i Organization: FreibergNet Internet Services Priority: normal X-Phone: +49-3731-781279 X-Fax: +49-3731-781377 X-PGP-fingerprint: 86 EC A5 63 B5 28 78 13 8B FC E9 09 04 6E 86 FC Hi all, I have an problem and I can't find a solution. I have a products database like this: code varchar, category varchar, title varchar, manufacturer varchar, description varchar, desc_de varchar, comment varchar, price float, ... What I try to find is a solution for a search in this table like this: select distinct code,category from products where code ~* 'abc' or category ~* 'abc' or manufacturer ~* 'abc' or description ~* 'abc' or comment ~* 'abc' order by code; So far so good, but I have the problem that I have the value 'abc' only one times ! This is in conjunction with minivend, an internet shopping mall, the query is generated as follows: .... ^^^

.... The question mark get's replaced by the contents of the HTML input field, and I have no chance to create a temporary table here (security issue). I must create a view or a rule or something to get a query like this: VALUE="select foobar from myview where comment ~* ?"> How can this be done ? Thanks in Advance, Holm -- FreibergNet Systemhaus GbR Holm Tiffe * Administration, Development Systemhaus für Daten- und Netzwerktechnik phone +49 3731 781279 Unternehmensgruppe Liebscher & Partner fax +49 3731 781377 D-09599 Freiberg * Am St. Niclas Schacht 13 http://www.freibergnet.de/