Received: from mx03.gis.net (mx03.gis.net [208.218.130.11]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g14JqUl92506 for ; Mon, 4 Feb 2002 14:52:30 -0500 (EST) (envelope-from cmr@shell.gis.net) Received: from shell.gis.net ([208.218.129.18]) by mx03.gis.net; Mon, 04 Feb 2002 14:52:25 -0500 (EST) Date: Mon, 4 Feb 2002 14:48:21 -0500 (EST) From: Chadwick Rolfs To: Shane Wright cc: pgsql-php@postgresql.org Subject: Re: constants In-Reply-To: <200202041400.g14E0oA11034@fullerruss.dsvr.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200202/15 X-Sequence-Number: 921 There is a define: define("MYCONST", "4"); read here... http://www.php.net/manual/en/language.constants.php and here... http://www.php.net/manual/en/function.define.php and anywhere else I might have missed. I haven't used postgresql to define constants, yet, but I do believe it's possible... On Mon, 4 Feb 2002, Shane Wright wrote: > Hi > > This may be the wrong list to ask this, apologies if so :) > > Anyway, is there any way to define constants in PostgreSQL - my app has lots > of them at the PHP level, but it'd be nice to use them directly in the SQL > without overly complex query building. > > Something like this... > > DEFINE CONSTANT MYCONST = 4; > > SELECT * FROM mytable WHERE myfield=MYCONST; > > > Thanks > > -- > Shane > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > Chadwick Rolfs - cmr@gis.net Cleveland State University - Student Music Major - The Holden Arboretum Volunteer Computer Programmer - Student Employee --*I finally found powdered water; I just can't figure out what to add to it*--