SELECT *,foto.body as body,event.titel as eventtitel,category.titel as cattitel,foto.top as top,event.top as eventtop,foto.visible as visible,event.visible as eventvisible,foto.created as created,event.created as eventcreated,foto.fotoID FROM foto,event,category WHERE ( (foto.eventID = event.eventID) and (event.catID = category.catID) ) and `foto`.`visible`=1 and `event`.`visible`=1 ORDER BY foto.created desc, foto.fotoID desc LIMIT 30 Incorrect key file for table '/tmp/#sql_13ed_0.MYI'; try to repair it