SQL-DATABASE ERROR

Database error in WoltLab Burning Board (2.1.5): Invalid SQL: SELECT * FROM bb2_sponsoren WHERE showsponsor_b=1 AND sponsorpartner=0 ORDER BY RAND() desc LIMIT 1
mysql error: Out of resources when opening file '/tmp/#sql_31c_137.MYI' (Errcode: 24)
mysql error number: 23
mysql version: 5.5.47-0+deb6u1-log
php version: 5.3.3-7+squeeze29
Date: 04.07.2020 @ 14:35
Script: /profile.php?userid=19&
Referer: