How about a UNION query...?

-----Original Message-----
From: Eric Anderson [mailto:[EMAIL PROTECTED]]
Sent: Tue, 14 August 2001 18:56
To: [EMAIL PROTECTED]
Subject: SELECT .. OR from multiple tables



I've got two tables, "Current" and "Temporary", Current has a row with
login='keric', Temporary doesn't.

The following query:

mysql> select * from Current, Temporary where Current.login='username'
or Temporary.login='username'
    -> \g
Empty set (0.01 sec)

obviously doesn't work.  I want to know if that row exists in either
table in one SQL call.  Maybe it's just me today..

Anyone?

--

------------------------------------------------------------------------
  Eric Anderson  Online Net-Entertainment, Inc  CyberIron Bodybuilding
   ICQ 3849549       <http://www.on-e.com>    <http://www.cyberiron.com>
 <[EMAIL PROTECTED]>        San Diego, CA            <[EMAIL PROTECTED]>
------------------------------------------------------------------------
      "..and then my doctor said my nose wouldn't bleed so much
       if I just kept my finger outta there!" -- Ralph Wiggum

 "You've got the brain and talent to do anything you want, and when you
   do, I'll be right there to borrow money from you!" -- Bart Simpson


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



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