empty checkbox 0 instead of NULL

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
pgergely
Posts: 6
Joined: 2018-10-15 17:49

empty checkbox 0 instead of NULL

Post by pgergely » 2020-11-03 10:29

After the update all the empty checkboxes become 0 instead of NULL; which creates a huges issue for the extra pages where the logic looking for fields not null.

Is there any way to change it as it was before 5.9, in order not to refresh the whole databease manually after each update?


Thanks

Panadu
Posts: 7
Joined: 2016-02-08 19:10

Re: empty checkbox 0 instead of NULL

Post by Panadu » 2022-04-05 20:16

Hello, i have the same problem.

I upgraded from v 5.84 to 5.97 and my apps made strange things after this. After long search, i found out, there are database fields filled with "0", when a checkbox wa s not filled. Until v5.84 empty checkboxes where not filled, the database field was "NULL" .

Please is ther any possibility to change this behavior? I changed alle my checkboxes to "varchar" instead of "integer" but the behavior is the same.

Thank you for Help.
Regards Panadu

User avatar
baudwalker
Veteran Member
Posts: 188
Joined: 2015-02-03 08:08
Location: Bellingen NSW Australia

Re: empty checkbox 0 instead of NULL

Post by baudwalker » 2022-04-05 23:10

I always thought that a checkbox and radio button were binary, 0 or 1 ( checked or unchecked, off or on). Null would make no sense.

Barry

Panadu
Posts: 7
Joined: 2016-02-08 19:10

Re: empty checkbox 0 instead of NULL

Post by Panadu » 2022-04-06 08:17

Hello,

yeah, thats right, but if your Appgini software doesn't fill the database with "0" , if you have not checked a field, until version 5.84 and the field is "NULL". What should i do? I cannot update appgini because of this failure.

What i need is a hook or so, independed from appgini version, so i can upgrade to actual version.Is there anyone with an idea ?

Bye
Panadu

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1814
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: empty checkbox 0 instead of NULL

Post by jsetzer » 2022-04-06 08:56

What about filling all records having NULL with 0 (zero) in TABLENAME_init() hook?
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

Post Reply