I have a table similar structure below.
id name position page
1 name1 1 1
2 name2 2 1
3 name3 3 1
4 name4 1 1
5 name5 1 1
6 name6 1 2
What i want is to select all the items for a given page number grouped
by pos and displayed in a view using a loop like:
display position number, number of records
for how many records have the same position number
output the name
for for example if i wanted page 1 i would get the following output:
postion 1, 3 records
position 2, 1 record
position 3, 1 record
is it possible to get all this information in 1 query and is it possible
to display in 1 loop.
could you please provide an example to get me started please.