Hallo, Ilja,
mein SQL- Kommando zickt. Kann MySQL 4.1 evtl den subselect nicht?
Ab wann geht der?
DELETE FROM tm_anwesenheit AS anw1
WHERE anw1.id IN
(SELECT anw2.id
FROM tm_anwesenheit AS anw2
WHERE anw2.adr_id = anw1.adr_id
AND anw2.slot_nr = anw1.slot_nr
AND anw2.id > anw1.id
)
MySQL meldet:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE anw1.id IN
(SELECT anw2.id
FROM tm_anwesenheit AS anw2
WHERE anw2' at line 2