It appears that this is forbidden ...

 From mysql.com:

The target table of the INSERT statement cannot appear in the FROM 
clause of the SELECT part of the query because it's forbidden in ANSI 
SQL to SELECT from the same table into which you are inserting. (The 
problem is that the SELECT possibly would find records that were 
inserted earlier during the same run. When using sub-select clauses, 
the situation could easily be very confusing!)



>   I don't know if it is the best but here's an idea:
>
>INSERT INTO table SELECT ha, he, hi, ho, hu FROM table LIMIT 1;
>
>--
>
>Julio Nobrega
>
>Don't eat the yellow snow.
>
>
>"Jim" <[EMAIL PROTECTED]> wrote in message
>news:p0510100fb8318736de56@[192.168.1.17]...
>>
>>  What's the best way to duplicate a mysql row with PHP and MYSQL?
>>
>>  --
>>  Jim Musil
>>  ---------
>>  Multimedia Programmer
>>  Nettmedia
>>  -------------
>>  212-629-0004
>>  [EMAIL PROTECTED]
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
Jim Musil
---------
Multimedia Programmer
Nettmedia
-------------
212-629-0004
[EMAIL PROTECTED]

Reply via email to