> Your query will work in every case, EXCEPT when either "Current" or
> "Temporary" has 0 rows, because then there's nothing to join. I'm not sure
> if doing a join is a "clean" way of doing this though.
>
> If you know that "Current" will never be empty (but "temporary" might be),
> then this query would work:
>
> SELECT * FROM current
> LEFT JOIN temporary ON 1=1
> WHERE current.login = 'keric'
> OR temporary.login = 'keric'
>
> That won't work if "Current" is empty.
>
> There's got to be a better way of doing this though... anyone else want to
> take a crack at this problem?
Sorry, the most likely scenario is that neither table has the value, but
either Current or Temporary could have it, though not both at the same
time.
---------------------------------------------------------------------
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