I need to print labels. I have people who ordered more than one book so i have to print the amount of labels equal to the amount of books they ordered.
Below query.
select id,name,total_copies from contacts.
that's the select statement. As is it can bring back
1,john,1
2,peter,3
3,sara,2
I need it to be
1,john,1
2,peter,2
2,peter,2
2,peter,2
3,sara,2
3,sara,2
total_copies column decides how many times to return the row.