I am looking for a way to get the location of a specific item after sorting my mysqliresult. I have a table like this:
id_______|_Name_____________|_ParentID
58 | Carl | 15
55 | Clark | 15
12 | David | 4
23 | Sophie | 15
45 | Amanda | 15
I'm only interested in lines with ParentID 15, and I want to sort them by their name. Then I want to look at a specific element, say id 55 (Clark) and find out what line number it fits. I want to create a table as follows:
id_______|_Name_____________|_ParentID
45 | Amanda | 15
58 | Carl | 15
55 | Clark | 15
23 | Sophie | 15
Then I want to get number 3 when I am interested in Clark, since his row is the third row in this new table.
mysqli? , , , , , thorugh .
!