Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: 13976
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: Thu May 09 01:38:26 CEST 2024

Total time taken to generate the page: 0.03034 seconds