php - How to return error Message in Output from Trigger? -
I am trying to create a trigger that ensures that the same This is giving me an error message. Please check this and guide me that I What's wrong here? < Div class = "post-text" itemprop = "text"> shop_id 3 times, and If the user tries to add more than 3 records for the same
shop_id , then it will throw an error message. I wrote the following trigger but giving me an error message
if (totals (different (shop_id)) 3) SET MESSAGE_TEXT: = 'You can not insert more than 3 records; end if;
MySQL said: # 1064 - There is an error in your SQL syntax; Check the Manual related to your MySQL server version for the correct syntax to use the nearest 'SET MESSAGE_TEXT: =' check to force
signal SQLSTATE '45000' SET MESSAGE_TEXT = 'You can not insert more than 3 records;
Comments
Post a Comment