I assume you have a table of products that already have records of these ids, and you want to put these rows in a related table of images. If so, you can write something like:INSERT INTO `catalogue_productimage` (`id`, `original`, `caption`, `display_order`,
`date_created`, `product_id`)
select id, 'images/products/2016/09/none.png', '', 0, '2016-09-29 11:07:36', id
from products
where id between 1 and 1261
If no such table is available, the same table may be used. catalogue_productimage♪ To this end, your first record is inserted into it, and the next few requests like this (if only one entry is in the table):INSERT INTO `catalogue_productimage` (`id`, `original`, `caption`, `display_order`,
`date_created`, `product_id`)
select id+1, original, caption, display_order, date_created, id+1
from catalogue_productimage;
INSERT INTO catalogue_productimage (id, original, caption, display_order,
date_created, product_id)
select id+2, original, caption, display_order, date_created, id+2
from catalogue_productimage;
INSERT INTO catalogue_productimage (id, original, caption, display_order,
date_created, product_id)
select id+4, original, caption, display_order, date_created, id+4
from catalogue_productimage;
The trick is, every subsequent request creates twice as many records as the previous one, so we're gonna need not more than 11 requests to reach around 1261. Requests are different only with additives to ID. In the last request, we're gonna have to limit the maximum id, so the request will get a condition. where id<=1261-1024♪