#StackBounty: #mysql #laravel #eloquent #mariadb Laravel Eloquent order by field as 1,2,3,4,1,2,3,4

Bounty: 250

I have goods table

good_link, parent_link, name
sdf-sdfg   ffff         rock    
utyruuur   ffff         qwe     
gfhdfggg   dddd         paper   
sdfghvcx   eeee         water   
ncvbcxvb   dddd         tree    
dsgfdsg    zzzz         sdff
sdfsdff    zzzz         fdgdf
sdfgdgg    zzzz         sdfsdf
dsvfdgg    zzzz         ssdfgr
brtyfgh    zzzz         fgdfgdf

How can I order data by parent_link to have data like

ffff
dddd
eeee
zzzz
ffff
dddd
zzzz
zzzz
zzzz
zzzz

so all goods goes one after another but always with different parent_link(previous row parent_link != next row parent_link, and ordering A-Z has no difference)?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.