Ok, I'm off topic. I'm trying to build some php code but can't get my SQL right.

http://www.mysql.com/doc/en/INSERT_SELECT.html

insert into ccl.ccl_maintest
(id,RNum,YR,AU,ST,SD,SC,BT,BD,BC,AT,AD,AC,SR,PL,PR,JR,VNum,INum,DT,PG,LG,SF,OL,KW,AUS,GEO,AN,RB,CO,RR)
select
id,RNum,YR,AU,ST,SD,SC,BT,BD,BC,AT,AD,AC,SR,PL,PR,JR,VNum,INum,DT,PG,LG,SF,OL,KW,AUS,GEO,AN,RB,CO,RR
FROM jdaxell.ccl WHERE id = 23

I have tried "WHERE jdaxell.ccl.id = 23" but it does the same thing.

It copies jdaxell.ccl.id=23 and inserts at ccl_maintest.id=23, instead of using the 
next auto_increment of ccl.ccl_maintest.id.

How can I get this to use the next auto_increment of id (Next Autoindex = 52)?

Thanks,
John


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

Reply via email to