Sounds like a left join, maybe even a "natural join", which I haven't tried yet.

select message
from project left join daily on project.uid = daily.uid
order by timestamp

Check manual for syntax.

Or am I missing something?

- Ken
[EMAIL PROTECTED]

At 05:47 PM 9/6/01 -0700, Michael Garvin wrote:
>Ok, we just can't seem to find a solution for this problem.  Thought I'd post it up 
>to see if anyone has any input.
>
>Say you have 2 tables project_notes and daily_notes.
>Each table has a timestamp, and a user_id.
>Is there any way, in one query, to select all messages from both tables that were 
>entered by a given user_id and
>sort by timestamp?
>
>This isn't the first time this problem has come up here where I work, another 
>application of this solution (if it exists) would be to query
>different tables representing different realms on our radius servers to get a total 
>usage summary across our network for a given user.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to