Re: constants

From: Chadwick Rolfs <cmr(at)shell(dot)gis(dot)net>
To: Shane Wright <me(at)shanewright(dot)co(dot)uk>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: constants
Date: 2002-02-04 19:48:21
Message-ID: Pine.SOL.3.96.1020204144315.17025A-100000@shell.gis.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

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(at)postgresql(dot)org
>

Chadwick Rolfs - cmr(at)gis(dot)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*--

In response to

  • constants at 2002-02-04 14:00:03 from Shane Wright

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Frank Bax 2002-02-04 21:12:11 Re: constants
Previous Message Shane Wright 2002-02-04 14:00:03 constants