pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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.




view thread (10+ messages)  latest in thread

Message-ID: <1077137634.18564.418.camel@jester>
Permalink:  ../1077137634.18564.418.camel@jester/
Also on:    postgresql.org/message-id/1077137634.18564.418.camel@jester

 · 

reply

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