jeudi 21 février 2019

MySQL trigger for checking duplicate record in Table before insert using php

I need to avoid duplicate entry from the table. the data come from another server as parallel database connection. which is directly inserted to my table but the fact is that i got duplicate row in same date so i need to avoid duplicate entry with trigger and my code is below

BEGIN IF(old.login_datetime==new.login_datetime) THEN DELETE FROM attlog WHERE emp_id=old.emp_id END



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire