U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ SQL » MySql, boolean values and SqlArray
Re: MySql, boolean values and SqlArray [message #45961 is a reply to message #45927] Sun, 31 January 2016 20:29 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
bool types in SQL are bit of mess. That is why I am usually using single char value there.

However, this should work fine. I believe that the issue here is that

query * Select(ID, NAME).From(MACHINISTS).Where(M1 == true);


gets converted to

query * Select(ID, NAME).From(MACHINISTS).Where(M1 == 1);


Fix is easy, use

query * Select(ID, NAME).From(MACHINISTS).Where(M1 > 0);


(Note that when developing SQL, it is always a good idea to have activated SQL log at least in debug mode - SqlSession::SetTrace())
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem with SqlUpdate
Next Topic: How to close a sqlite session
Goto Forum:
  


Current Time: Tue Sep 08 12:04:43 GMT+2 2026

Total time taken to generate the page: 0.00902 seconds