Re: updating integer column

Поиск
Список
Период
Сортировка
От Aspire Something
Тема Re: updating integer column
Дата
Msg-id 000b01c2db6f$2bf0a840$c9c832c0@societykotla
обсуждение исходный текст
Ответ на updating integer column  (Bruce Young <hbrucey@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Young
Дата:
Сообщение: Re: updating integer column
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: updating integer column