Scott Haneda <[EMAIL PROTECTED]> wrote:
> I currently run this, which is 2 hits to the database.
>
> Select serial from blacklist where serial = '23'
> Select serial from seriallist where serial = '23'
>
> I only desire to know if either of the 2 has at least one row, I am only
> testing for existence here. Is there some way I can get around 2 queries
> and do this as one?
>
Use UNION:
http://www.mysql.com/doc/en/UNION.html
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Egor Egorov
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]