Ho una tabella nel mio DB denominata "studenti" contiene le seguenti colonne (student_id, student_name, year_of_birth) .e serie di anni Ho provato a creare una query che ottiene 10 id_sidile di ciascuna anno in (anni) array.limite multiplo mysql in una istruzione sql
Potrei scrivere
SELECT student_id FROM `students` WHERE year_of_birth=1950 LIMIT 10;
SELECT student_id FROM `students` WHERE year_of_birth=1951 LIMIT 10;
SELECT student_id FROM `students` WHERE year_of_birth=1952 LIMIT 10;
SELECT student_id FROM `students` WHERE year_of_birth=1953 LIMIT 10;
(and so on)
ma sarebbe molto che richiede tempo Ci sono altre opzioni Thank you
se sei più preoccupato del limite, puoi limitarlo in php, con un contatore. –