Creating temp table with data out of 2 tables possible?

From: Date: Fri, 08 Feb 2002 23:09:46 +0000
Subject: Creating temp table with data out of 2 tables possible?
Groups: php.db 
Request: Send a blank email to php-db+get-16738@lists.php.net to get a copy of this message
Hi there, how is it possible to copy rows from more then one table into a temporary table? I have 250 city tables named after the country e.g: ca_cities. Now the user has choosen stuff from lets say ca and gm. I want to collect the data into a temp table and then querry this temp table for other stuff. I always get the error: Error: 1060 Duplicate column name 'id' Here is my statement made for a sample of two tables creating the temporary one ( works with one) $stmt =" CREATE TEMPORARY TABLE all_cities SELECT * FROM $DB2.$country_found[0]_cities, $DB2.$country_found[1]_cities "; Does anybody have a clue whats going on here? Thanx for any help Andy

« previous php.db (#16738) next »