OK, I have check all the mysql doc and php docs on using exists in the query, but it seems I still can not get the query to work. Here it is: SELECT * FROM icisp.account WHERE id in (select oldaccountID from BillMax.account) Or Using sELECT * FROM icisp.account WHERE id exists(select oldaccountID from BillMax.account) Anyone have any idea what I'm doing wrong? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php