if i call my procedure
SET SQL_SAFE_UPDATES = 0;
call merken("1","10101193771","wahr")
then all entries will be deleted.
My procedure look like this:
CREATE DEFINER=`auditcheck_New`@`%` PROCEDURE `merken`(IN id_kunde varchar(100),IN id_pdf
varchar(100),IN schluessel varchar(10))
BEGIN
if schluessel = "wahr" THEN
DELETE FROM gemerkt WHERE id_kunde = id_kunde AND id_pdf = id_pdf;
else
INSERT INTO gemerkt (id_kunde,id_pdf,datum) VALUES(id_kunde,id_pdf,NOW());
END IF;
END
The result after i run the procedure call
введите описание изображения здесь