I am using a technique described here at:
To make results Random before applying the GROUP BY method.
The query to my table structure is this:
(SELECT r1.id FROM physicians_images r1 WHERE
(r.physicians_id=r1.physicians_id AND procedures LIKE '%8%' AND category =
'beforeafter' AND publish = 1) ORDER BY rand() LIMIT 1) AS 'id' FROM
GROUP BY r.physicians_id ;
I have the following columns:
id, physicians_id, imageName, imagePath, title, imageDetails, DateTime,
publish, Date, ip, category, site, patientName and procedures
The query is working well, but it only returned the ID, not the whole row.
How can i get the complete rows in results?
I tried using * but its returning with the following error:
#1241 - Operand should contain 1 column(s)
|• Using RANDOM before GROUP BY technique returned only a single column||Highviews||7 Jul|