Andrea Federico Grisotto wrote:
*fromId* and *toId* are VARCHAR, if I use *int* the behavior is correct,
excuse me again, but remain the difference behavior between sqlite
and Mysql.
just food for thought: when you're asking an ambiguous question (like in
the case of comparing apples with potatoes) the answer is a question of
interpretation.
since you have declared fromId and toId to be VARCHAR, it is correct to
compare them with other VARCHAR values, like here...
SELECT * from np WHERE ('42'>=fromId) AND ('42'<=toId);
in this case you are clearing stating what you want and you get the same
answer from both engines.
in the expression (42 >= fromId) mysql converts fromId to integer and
performs an integer comparison, while sqlite3 converts the 42 to string
and performs a string comparison. as said, a question of interpretation.
hth,
MF
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------