sending null value to database.
sending null value to database.
Hi,
is it possible to send null value to mysql database and not 0 ?
[code]
"label": "Label",
"name": "Name",
"default": null,
[/code]
When I do like above, my database recieves the value 0 and not NULL.
I tried it with
"default": "",
but same result.
Thank you.
is it possible to send null value to mysql database and not 0 ?
[code]
"label": "Label",
"name": "Name",
"default": null,
[/code]
When I do like above, my database recieves the value 0 and not NULL.
I tried it with
"default": "",
but same result.
Thank you.
This discussion has been closed.
Replies
Have you tried this (only from memory):
1. Make NULL the field's default value in MySQL;
2. When inserting new records, don't send that field anything.
You might need to use a set formatter if you are using the Editor PHP libraries: http://editor.datatables.net/docs/current/php/class-DataTables.Editor.Field.html#_setFormatter
Allan