Received: from oly.silverlink.net (root@oly.silverlink.net [209.20.168.1]) by hub.org (8.9.2/8.9.1) with ESMTP id WAA02325 for ; Fri, 26 Feb 1999 22:08:52 -0500 (EST) (envelope-from shanen@silverlink.net) Received: from silver170-44.silverlink.net (silver170-44.silverlink.net [209.20.170.44]) by oly.silverlink.net (8.8.5/8.6.9) with SMTP id TAA20086 for ; Fri, 26 Feb 1999 19:14:32 -0800 (PST) Received: by silver170-44.silverlink.net with Microsoft Mail id <01BE61BB.4892A020@silver170-44.silverlink.net>; Fri, 26 Feb 1999 19:07:41 -0800 Message-ID: <01BE61BB.4892A020@silver170-44.silverlink.net> From: Sue Hanen To: "'pgsql-sql@postgresql.org'" Subject: Trying to concatenate using a string variable and text Date: Fri, 26 Feb 1999 19:02:44 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id WAA02326 In the simplest form I need to built a query using a variable concatenated with some text. Something like this: $query = "select * from table where fieldname $oper '$key[0]' " And then I'd like to concatenate that $query with the following in a while loop: $query = $query || " $logic fieldname $oper '$key[$i]' " and when the while loop is done concatenate one last time with the following: $query = $query || "order by fieldname" $oper has been set to the regular expression characters ~ or ~* for case sensitivity $logic has been set to OR This code worked under PHP2 but I can't seem to get it to work under PHP3. I thought that all I would have to do is replace the plus sign (which was the concatenation character in PHP2 with the || which is the concatenation character in PHP3. I am new to PHP and any help I can get is greatly appreciated. Sue