Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.2

Request #2888 Automatically add null element in Select for Link if field may be null
Submitted: 2004-12-04 15:43 UTC
From: c dot schneider at scram dot de Assigned: justinpatrin
Status: Closed Package: DB_DataObject_FormBuilder
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Comments Add Comment Add patch

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 35 + 32 = ?

 [2004-12-04 15:43 UTC] c dot schneider at scram dot de
Description: ------------ If I have two tables: person id car_id (may be null in database) car id name and a link in db_name.links.ini [person] car_id = car:id Inside a person form I get a select for car. As the database allows this field to be null. The select should also contain a null element. Is this possible?


 [2004-12-04 21:27 UTC] justinpatrin
The selectAddEmpty option does this: I understand your point, however.
 [2004-12-05 00:17 UTC] c dot schneider at scram dot de
I already use this option to work around the problem. But selectAddEmpty does not add a NULL to the row. In my case the field is an int and should contain NULL if no link is selected but FormBuilder sets the field to 0. Is this a bug?
 [2004-12-08 00:26 UTC] justinpatrin
I've added this to the CVS version, but I'm not sure it's correct to leave it on for everyone. Do other DBMS get DB_DATAOBJECT_NOTNULL on their columns? If not, this should be an option which is off by default. BTW, I also fixed the "bug" which doesn't set the column to NULL when using selectAddEmpty. I could remove the auto-empty option and you'd still get NULL in the column.
 [2004-12-08 00:26 UTC] justinpatrin
Forgot to switch to Feedback status.
 [2004-12-08 01:36 UTC] c dot schneider at scram dot de
I have just installed the cvs version and can confirm it works in my test example. Many thanks for the fast fix.
 [2004-12-12 07:17 UTC] justinpatrin
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on In case this was a website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.