'Matze: MySQL - Limit-Problem

Beitrag lesen

Nach verzweifelter Suche habe ich nun endlich die Lösung gefunden.
Fürs Archiv:

  
SELECT uploadcategorys.id catId,  
       uploadcategorys.categoryName catName,  
       uploadedfiles.id fId,  
       uploadedfiles.fileName fileName,  
       uploadedfiles.fileSize fileSize  
FROM (SELECT id, categoryName  
      FROM uploadcategorys  
      ORDER BY id DESC  
      LIMIT ?, ?)  
     uploadcategorys  
LEFT JOIN uploadedfiles  
ON uploadcategorys.id = uploadedfiles.categoryId  
ORDER BY uploadcategorys.id DESC, uploadedfiles.id  

uff...

...und wieder zurück zu C++ :)

Grüße, Matze