+ 1

How can i insert multiple checkbox values in sqlite database in android

CRUD opretions in android

6th Oct 2019, 8:24 PM
Virat Kodi
Virat Kodi - avatar
2 Réponses
+ 3
someone else asked this here: https://stackoverflow.com/questions/48358481/insert-checkbox-values-into-sqlite-database and the advice was to store the checkbox value as integer or string values 1 or 0. a checkbox is just a binary switch, so only has two values. simplest to just store it as 1 or 0.
28th Oct 2019, 10:07 AM
Nathan Stanley
Nathan Stanley - avatar
+ 2
you can also store multiple values in one value using bitwise operators: http://nikohelle.net/2010/11/02/tip-use-bitwise-operators-to-store-multiple-values-in-one-value/
28th Oct 2019, 10:55 AM
Nathan Stanley
Nathan Stanley - avatar