Oh that is interesting !!
When I created the table I had the following column declarations:
recordID INTEGER PRIMARY KEY,
userID INTEGER UNIQUE,
name CHAR,
email CHAR
I thought I read that sqlite 2.8 does recognize INTEGER and then stores
those as numeric values, and not strings. But am wondering if php will
convert it over to all strings anyway since php does funky auto typing on
it's own. (or rather I don't understand the rules that php uses for it's
type juggling in relation to sqlite)
Next Question - if I use the statment:
SELECT max(userID) AS 'highest_userID' FROM maillist WHERE userID <> ''
Would that produce the same results for both NULL numeric entries and empty
strings?
Thanks
Shorty
recordID userID name email
1 1 John j...@somewhere.com
2 2 Mike m...@example.com
3 3 Bill b...@example.com
4 null Steve st...@example.com
Your database doesn't contain the data you think it does. Unassigned
userId
values are not NULL, but empty strings. By SQLite rules, any string is
compared greater than any number.
Igor,
Probably this is not true in this SQLite version:
I'm running php 5.2 that has sqlite 2.8.17
Pavel
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users