And exactly what you expect "nothing" to look like? If "nothing" (no rows) 
 is the correct response to your query, how would you like it formatted?

Without knowing exactly how you are executing this query, it's impossible 
to know how to tell you how to detect an empty result set (assuming you 
are executing this query from some kind of script or application).

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

[EMAIL PROTECTED] wrote on 06/16/2005 10:47:25 AM:

> 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]

Reply via email to