phpLens
 home  products examples manual  faq support forum  contact news  login store

Forums: phplens   adodb
Forums:   ADOdb Help & Dev:   Replies 
New ReplySearch
Topic: One simple question. Inserting the string 'null'...
author: Eloy Lafuente Plaza   created: 02-10-2006 03:04:34 PM
Hi,

recently we have discovered that the 'null' string is automatically converted to the null value before being inserted to DB by GetInsertSQL().

After reading a bit about ADODB_FORCE_TYPE, it seems that there is no option about leaving the 'null' string unmodified and it always get converted to empty or null values. I wonder it will be a good cause for that conversion from 'null' to null but, perhaps, some way to skip it could be interesting.

Is there any way to bypass this conversion? We have detected it because 'null' is one correct answer in one questionnaire and it isn't being inserted at all. I know this could be considered as a "curiosity" but... any alternative will be really welcome.

TIA and ciao :-)
Topic: Re:One simple question. Inserting the string 'null'...
author: John Lim   created: 04-10-2006 06:00:50 AM
I have changed all appropriate references 'null' in adodb-lib.inc.php to

$zthis->null2null

and in adodb.inc.php i added a new property to the connection class:

var $null2null = 'null';


====

For your case, change it to some impossible combo such as:

$db->null2null = '3##$#$#@#@#@!!@!$%535343676$#$8234fsdfsd';

to disable 'null' string to null conversion.
Topic: Re:One simple question. Inserting the string 'null'...
author: John Lim   created: 04-10-2006 06:07:53 AM
PS: I will release a new version of adodb, probably on Monday next week.
Topic: Re:One simple question. Inserting the string 'null'...
author: Eloy Lafuente Plaza   created: 06-10-2006 09:36:51 AM
Oh! That sounds as really good news. Thanks John!
Page 1
New ReplySearch

View Source

email: contact#phplens.com (change # to @)     telephone (malaysia): 60-3-7947 2888     fax (malaysia): 60-3-7947 2800