ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Many to many relation sorting problem

samir1903 29 Aug, 2022
Hi,

Students
ID
name
surname


Absence
ID
Student_ID
absence_number
reason

so here each students have a lot of absent records, I want to show total absence per student, sum(Absence.absence_number):Students.absence_total works perfect.

The problem is if I show one to many relationship it shows lots of empty pages, I have do many to many relationship (group by Absent.ID) this time I cannot sort Students.absence_total I cannot even use in where clause. I want to make it with many to many relationship I think it is ideal. but how to sort and use it in where clause.
GreyHead 30 Aug, 2022
Hi samir,

There is a post on StackOverFlow here that may help you.

Bob
samir1903 30 Aug, 2022
Hi GreyHead,

I don't know what do you mean, how can I use mysql like having count distinct in read_data somewhere.
HAVING COUNT(DISTINCT
You need to login to be able to post a reply.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com