Using PHP and MySQL 3.23, I create a temporary table. Then, in the same page, I join the temporary table to another query. Most of the time it works. On about 10% of tries, however, I get an error 'temptable does not exist.' Any help appreciated. Daniel -------------------------------------------------- Daniel Cher, MD Product Manager CareThere 635 Clyde Avenue Mountain View, CA 94043 Tel 650-237-3936 Mob 650-269-4604 FAX 650-625-9133 [EMAIL PROTECTED]