Mysql select list of items (repeat until certain amount)

aiconan

New Member
I have the following structure:\[code\]Table: productsid, name, sort_order\[/code\]Let's say I only have 5 products, but I want 20.How would I loop through to get 20 results?Additionally, I'll need to start at a specific sort_order. So let's say I have\[code\]1,2,3,4,5\[/code\]and I want to get 20 results and start at 3. It should end up as:\[code\]3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,etc.\[/code\]Any ideas? I'm totally lost.. thank you!
 
Back
Top