RE: [PHP-DB] select particular columns in query
| From: | Bastien Koert | Date: | Wed, 08 Dec 2004 15:49:24 +0000 |
| Subject: | RE: [PHP-DB] select particular columns in query | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-37644@lists.php.net to get a copy of this message | ||
INSERT INTO
dbname.newtablename
SELECT *
FROM dname.oldtablename ;
bastien
From: blackwater dev <blackwaterdev@gmail.com> Reply-To: blackwater dev <blackwaterdev@gmail.com> To: php-db@lists.php.net Subject: [PHP-DB] select particular columns in query Date: Wed, 8 Dec 2004 10:46:44 -0500 Hello, I want to create a new row in the db by copying an existing one. My db has an auto incrementing id so I can't simply do insert into cars select * from cars where id=$id as this throws the primary key error. How can I do this with out specifying each column? Thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php