RE: [PHP] Duplicating a Record in MySQL
| From: | John W. Holmes | Date: | Sat, 19 Oct 2002 17:59:33 +0000 |
| Subject: | RE: [PHP] Duplicating a Record in MySQL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-120614@lists.php.net to get a copy of this message | ||
> It's not strictly php, but does anyone know an easy way to duplicate a
> record in MySQL. It would be nice if you could write something like:
>
> COPY * from table WHERE id = 6;
>
> and have it insert a new record into the table with the next id
number.
I think that if you have to do this, you've got design issues. Why not
just keep a "count" column in the row and increment that, instead of
duplicating the row.
---John Holmes...