In phpmyadmin and wanting to copy the mentioned rows below to within the same table. I am not copying the id so it is automatically incrementing. Why isnt it working??? Thanks in advance.

INSERT INTO `table1`
(title, alias, published, introtext, video, gallery, extra_fields, extra_fields_search,
created, created_by, created_by_alias, checked_out, checked_out_time, modified, modified_by, publish_up,
publish_down, trash, access, ordering, featured, featured_ordering, image_caption, image_credits, video_caption,
video_credits, hits, params, metadesc, metadata, metakey, plugins) where id between 763 and 1348

SELECT title, alias, published,
introtext, video, gallery, extra_fields, extra_fields_search, created, created_by, created_by_alias,
checked_out, checked_out_time, modified, modified_by, publish_up, publish_down, trash, access, ordering,
featured, featured_ordering, image_caption, image_credits, video_caption, video_credits, hits, params, metadesc,
metadata, metakey, plugins FROM table1 where id between 763 and 1348

Recommended Answers

All 2 Replies

Thanks pritaes... That worked. Just so other people can use the script it ended up looking like this .

INSERT INTO `table1`
(field1, field2, field3)

SELECT field1, field2, field3

FROM table1 where id between 766 and 933

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.