Set_value NULL works with form- but not with grid-connector

Hello,

i have a problem with my connector file.
I am using a php-mysql connector for a grid and for a form.
Some values I have to reset to NULL before updating the database.

I am using something like this:

function myUpdate($action){
if ($action->get_value('betrag') == "" || $action->get_value('betrag') == "0.00" || $action->get_value('betrag') == 0) $action->set_value('betrag', NULL);
}
$form = new FormConnector($res);
$form->set_encoding("utf-8");
$form->event->attach("beforeUpdate",myUpdate);
$form->render_table(...);

and this works fine with the form-connector, but has no effect with the grid-connector. I can enter any other value for set_value and it will work, but not with “NULL”.
I am using the files from the latest php-connector (dhtmlxConnector_php_v15_120612.zip).

Please help me.
Thanks!

Hi,
the same feature works correctly at local machine.
Please, make sure that database field enables null.
If still doesn’t work then could you provide complete demo?

Hi,

standard of DB field is NULL. And it works perfectly with the form update.
It’s only when I update by editing the grid directly (via dataProcessor).

How can I provide a working demo when this is dierctly connected to a mysql db?

best regards

You could provide dump of database structure and some test data.
Please, enable log for connector:

$conn->enable_log("temp.log");

After that try to run your update for FormConnector and GridConnector. Provide generated log-file, please.