Boolean value

awgcas 27 Jun, 2011
Hi to all,
and many many congratulations: great piece of software!!!

I have a little problem while populating a field of my db table.

Last field of my table must contain a boolean value (true or false), so I set up as a TINYINT (1);
the question for the users is if they agree to publish content of other fields of the table, with a simple

WHERE radio1 = 1

where radio1 is obviously the name of the field.

Then I created a form, and inserted a radio box with Yes/No values (Sì/No in italian, as the form is for italian people); so, whatever option I choose, in radio1 field I always get 0 (zero).
All other fields are correctly filled.

What am I doing wrong?

Thanks in advance,
Alessandro

PS Sorry for my "approximate" english ...😶
GreyHead 27 Jun, 2011
Hi awgcas ,

If you want the radio button to return 1 & 0 then set the values to '1' & '0'.

'Si' and 'No' will both be saved in a TINYINT as 1 as they are not empty.

Bob
awgcas 28 Jun, 2011
Hi Bob,
thank you very much for your suggest.

I will try to change my form "logic" to better arrange with my needs.

Regards,
Alessandro
This topic is locked and no more replies can be posted.