You got exactly what the db found. An "Empty Set". You wouldn't get '0' results because there aren't '0', it's EMPTY. It's not NULL either since NULL is a form of non-existence.
Why were you expecting '0'? J.R. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 16, 2005 10:47 AM To: mysql@lists.mysql.com Subject: No result at all (expected 0) Hi everyone! I have a little question. I have two tables which are used for saving private messages. If a user has NO messages, the result doesn't return _anything_. I expected to get "0 results" but this really confuses me. Query: SELECT upn.id, upn.fid, upn.tid, upn.subject, upn.message, upn.date, upn.state, u.login FROM tx_user_pns AS upn, tx_user AS u WHERE upn.fid = u.id AND upn.tid = 19 ORDER BY upn.state ASC, u.login ASC, upn.date DESC; Tables: CREATE TABLE tx_user ( id int(11) NOT NULL auto_increment, login varchar(255) NOT NULL default '', password varchar(255) NOT NULL default '', level int(11) NOT NULL default '0', intern tinyint(1) unsigned NOT NULL default '0', last_login datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (id), UNIQUE KEY login (login) ) TYPE=MyISAM; CREATE TABLE tx_user_pns ( id int(11) unsigned NOT NULL auto_increment, fid int(11) NOT NULL default '0', tid int(11) NOT NULL default '0', subject varchar(255) NOT NULL default '', message text NOT NULL, date datetime NOT NULL default '0000-00-00 00:00:00', state tinyint(1) unsigned NOT NULL default '0', PRIMARY KEY (id) ) TYPE=MyISAM; Tanks in advance, Marco -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]