inserting a null value into table

From: "Juliet May" <jmay(at)speark(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: inserting a null value into table
Date: 2002-06-11 20:19:05
Message-ID: 014e01c21185$3c54d3f0$a1d2a8c0@sweetbeet2k
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I can't seem to find anything in my book and the postgresql website seems to be down but on occasion I need to insert null values into my database. The values that need to be inserted come from a form and a do not want to require that all elements of the form are filled out prior to submitting. I would like the user to be able to leave some of the form elements blank.

The php and sql statements I am using look something like this:

if ($seed_spacing=='')$seed_spacing=(what should I put here to make it null?);

$sql="insert into seeding (seeding_date, seeding_acres, seed_spacing) values ('2002-05-22', 50, ??)";

Thanks for the help,

Julie

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2002-06-11 20:56:27 Re: inserting a null value into table
Previous Message Josh Berkus 2002-06-11 19:28:04 Re: View management