From: Rod Taylor <pg@rbt.ca>
To: Scott Marlowe <scott.marlowe@ihs.com>
Cc: Jeremy Smith <jer@highboard.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Inserting NULL into Integer column
Date: Wed, 18 Feb 2004 15:53:55 -0500
Message-ID: <1077137634.18564.418.camel@jester> (raw)
In-Reply-To: <Pine.LNX.4.33.0402181317100.3215-100000@css120.ihs.com>
References: <Pine.LNX.4.33.0402181317100.3215-100000@css120.ihs.com>
> and then you can foreach across the input:
>
> foreach($fields as $f){
> if (!$_POST[$f]){
> $_POST[$f]='DEFAULT';
> } else {
> $_POST[$f] = "'".$_POST[$f]."'";
> }
> }
Default in quotes isn't going to work, and please tell me you escape
those things with pg_escape_string() at some point.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: pg@rbt.ca, scott.marlowe@ihs.com, jer@highboard.com
Subject: Re: Inserting NULL into Integer column
In-Reply-To: <1077137634.18564.418.camel@jester>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox