Re: updating integer column - Mailing list pgsql-php

From Aspire Something
Subject Re: updating integer column
Date
Msg-id 000b01c2db6f$2bf0a840$c9c832c0@societykotla
Whole thread Raw
In response to updating integer column  (Bruce Young <hbrucey@yahoo.com>)
List 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

pgsql-php by date:

Previous
From: Bruce Young
Date:
Subject: Re: updating integer column
Next
From: "scott.marlowe"
Date:
Subject: Re: updating integer column