diese Abfrage funktioniert manchmal. warum nicht immer?
Code:
SELECT produkt_id AS id, produktname, produktbeschreibung,
(SELECT bild_id FROM shop_bilder WHERE produkt_id=id ORDER BY RAND() LIMIT 1) AS bildid,
(SELECT bildname FROM shop_bilder WHERE bild_id=bildid) AS bildname,
(SELECT typ FROM shop_bilder WHERE bild_id=bildid) AS typ
FROM shop_produkte
GROUP BY shop_produkte.produkt_id
ORDER BY hitliste DESC");echo mysql_error();