Re: updating integer column

From: "Aspire Something" <aspire420(at)hotpop(dot)com>
To: "pgsql-php" <pgsql-php(at)postgresql(dot)org>
Subject: Re: updating integer column
Date: 2003-02-23 19:09:29
Message-ID: 000b01c2db6f$2bf0a840$c9c832c0@societykotla
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Hi,

You can get aroung this type of problem by identifing the filed type and then add an default value of the field when the record is null
provided by PHP .

Make an function to do this .

As.
1. function(DATA_TYPE,PG_FIELD,DATA,DEFAULT_VALUE)

{
// DATA_TYPE is an array that contains the datatype of the PG_FIELD
//PG_FILED is the array of column name in which you would like to insert the data
//DATA is the array of the data you retrived from your form
//DEFAULT_VALUE this is the array of the default values

NOW loop thru the DATA array and when an null value is found
replace it with the deafult value

TIP :
You may use
1 for loop
2. For each loop
}

If you want an working example revert back .
Regards
Aspire420

Browse pgsql-php by date

  From Date Subject
Next Message scott.marlowe 2003-02-24 17:18:17 Re: updating integer column
Previous Message Bruce Young 2003-02-23 18:14:42 Re: updating integer column