Re: coding for multiple databases

2013-03-24 Thread Dr. Hawkins
On Sun, Mar 24, 2013 at 8:19 AM, Robert Sneidar wrote: > mySQL DOES in fact have a boolean. You can use false and it equates to 0. > True equates to 1. I use booleans all the time in my code and in my > database structure. Where did you get that mySQL does not have a boolean > type? > That is re

Re: coding for multiple databases

2013-03-24 Thread Robert Sneidar
mySQL DOES in fact have a boolean. You can use false and it equates to 0. True equates to 1. I use booleans all the time in my code and in my database structure. Where did you get that mySQL does not have a boolean type? Bob On Mar 23, 2013, at 10:45 AM, Dr. Hawkins wrote: > Unless my calenda

Re: coding for multiple databases

2013-03-23 Thread Peter Haworth
SQLite lets you define whatever data types you want. Nothing to stop you defining a column with BOOLEAN data type, internally it will be stored as NUMERIC. After that, you can use: SELECT * FROM mytable WHERE icare=1 ...for all your databases Pete lcSQL Software On Sat

Re: coding for multiple databases

2013-03-23 Thread Mark Wieder
Richard- Saturday, March 23, 2013, 10:45:30 AM, you wrote: > Anyway, to deal with queries where I have to use non-standard syntax, it > seems that I can have switches: > switch dbTyp > case postgres > put "SELECT * FROM mytable WHERE icare=True" into dcmd > break > case mySql > put "SELECT * FRO

Re: coding for multiple databases

2013-03-23 Thread Mark Wieder
Richard- Saturday, March 23, 2013, 10:45:30 AM, you wrote: > Unless my calendar is off, it's 2013. mySQL doesn't even have a boolean, Been a while since I've had to deal with MySQL, but http://dev.mysql.com/doc/refman/5.0/en/boolean-literals.html -- -Mark Wieder mwie...@ahsoftware.net ___

coding for multiple databases

2013-03-23 Thread Dr. Hawkins
As I try to keep this thing coded to support postgres, SQLite, and mySQL, I'm getting increasingly frustrated by the "oh, we don't support that; code it our way instead" attitude of SQLite and mySQL. Unless my calendar is off, it's 2013. mySQL doesn't even have a boolean, and SQLite can't handle