Re: Inserting NULL into Integer column
Rod Taylor <pg@rbt.ca>
From: Rod Taylor <pg@rbt.ca>
To: Scott Marlowe <scott.marlowe@ihs.com>
Cc: Jeremy Smith <jer@highboard.com>, pgsql-sql@postgresql.org
Date: 2004-02-18T20:53:55Z
Lists: pgsql-hackers, pgsql-sql
> 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.