Please tell me how to get the first five items of data for each category under the classification table. There are two tables (commodity table and commodity classification table).

    

clipboard.png


clipboard.png

Mar.12,2021

query the first five pieces of data for each category, and then merge the array

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e48950-44cbf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e48950-44cbf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?