I'm trying to get a count of rows, for use in pagination, but all I'm getting is a count of one per result, which I'm sure is an artefact of using INNER JOINs.
I've managed to trim the query down to the most essential parts before getting errors:
bookings.booking_id AS id,
DATE_FORMAT(bookings.creation_date, '%W %D of %M %Y, %H:%i') AS creation_date
(bookings.booking_id = bookings_attendees.booking_id)
(bookings.client_id = '6')
(bookings.status = 'pending')
(bookings.mode = 'public')
(bookings.booking_id = bookings_clients.booking_id)
(clients.client_id = bookings_clients.client_id)
(clients.client_id = '1')
GROUP BY id
It is more than likely the structure of the query itself is to blame in some way (I'm developing a multi-user system, which needs to determine the various users based on their parent client).
I want a COUNT of all rows for bookings.booking_id.