Andy wrote:

> 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

try to use coulumn names not * and rename columns
Jarek

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to