Finian826
Posts: 29
|
| Posted: 12/18/2008, 10:18 AM |
|
Good day,
I want to take a checkbox list and enter all the values into a single DB field, either comma or semi-colon seperated. On the reverse side I want to be able to display the checked items to a form for updating.
Any help would be great. This would be a great default feature for some upcoming version.
Terry
|
 |
 |
melvyn
Posts: 333
|
| Posted: 12/18/2008, 2:20 PM |
|
1) Set all fields as you normally do it. In datasource property use "CustomCode" Instead of db field.
2) Set one aditional field and link that one to your DB.
3) In BeforeInsert event use implode function (or whatever you like) to concat all those fields into a single string, separated by comma, semicolon or whatever. The purpose is take all fields and store in a single value.
4) In BeforeShow Event use explode function to separate all those fields and assing them to the custom code.
I recommend the usage of ENUM field type in the DB (I guess you're using mysql.
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com |
 |
 |
|