about sqlite3_get_table()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

about sqlite3_get_table()

emilia12


Hi,

what is the difference between sqlite3.exe (the command-line
shell) and an application which calls sqlite3_get_table()?
Because the same sql script gives different results! :-)
the script:
In sqlite327.exe:
CREATE TABLE accounts (us TEXT, pw TEXT, md5 TEXT, UNIQUE
(us));
INSERT INTO accounts VALUES('guest','guest',NULL);
INSERT INTO accounts VALUES('ivan','alpha',NULL);
INSERT INTO accounts VALUES('Administrator','',NULL);

and now:
(in sqlite327.exe)
SELECT us, pw FROM accounts WHERE us == 'ivan' OR pw ==
'alpha';
gives
ivan|alpha

but the app (sqlite3_get_table()) called with the same sql
cmd
returns only the header
us|pw

and with sql := "SELECT us, pw FROM accounts WHERE us ==
\'ivan\';"
it works ok (same as sqlite327.exe), gives:
us|pw
ivan|alpha

so why the OR breaks the query (usualy .true. OR .any. ==
.true.) ???

any idea?



regards
emily


-----------------------------

Коледа е - всеки заслужава подарък. Тази Коледа с всеки хостинг пакет SuperHosting.BG
Ви подарява книга и дава шанс за спечелване на 3x MP3 плейъра и мобилен телефон.
http://www.superhosting.bg/promo2.adv