questo lo dovrei fare in una sola queri di fatti ho usato la funzione COUNT() e LIMIT e funge tutto bene eccezzion fatta per un errore :
#1140 - Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
questa è la query :
SELECT COUNT(id) AS Number,campo1 FROM tabella WHERE condizioni.... LIMIT 0,12

Rispondi quotando