Answer the question
In order to leave comments, you need to log in
How to select multiple random posts that should have one or two rows with a specific id?
How to select multiple random posts that should have one or two rows with a specific id ?
Answer the question
In order to leave comments, you need to log in
Select * from table where id=14 order by rand() limit 88 - will select a maximum of 88 rows that have an id of 14. But this will be slow, and will slow down as the number of records grows. You can initially generate a random number and use it as the initial shift in limit. Either it’s night, or I didn’t understand completely - at the beginning, talk about a few, then about one or two ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question