For professional reasoning in my application, I need to insert a line in table X when a line in Table Y is inserted She goes. Apart from this, it should be done only between specific times (for which I have to ask the second table). I have considered running it every 5 minutes or a script to check it, but I stumbled on the triggers and it felt that there could be a better way of doing this.
But for me, syntax is getting a slight deviation for the process. I have not got any error which I do not know how to fix it. Here's where I am starting:
After creating reserved reserved ROR RORO_RP after starting RAR on RAR, if new ST_ type = 1 / * in-app * / then `message Include in `history` (` trip`, `faq`,` sent_time`, `condition`,` message_type`, `message`) value (nudrip, new p, 'now'), 'submit', 4, This is an automated reply reservation '); End;
I get an error in the value portion of the Stateman but I'm not sure where I still need the information to ask a second table, but I can not even get this part is. Any help is appreciated, which includes links to many instances .. Thank you
> Reservation.sent_time , but I think you put the code in the quotation marks in the OK, here are two other issues: First of all, the need for Second, are you using This is necessary because the mysql client allows you to run multiple instances in interactive mode or SQL script. But it is a kind of dumb - it considers the input as a SQL statement unless it receives the terminator of the statement. Generally the terminator is semicolon ( But your triggers are literally semicolons in the body! If the mysql client closes on the first semicolon, then it will attempt to define your trigger by using an incomplete statement. The solution in the mysql client is to temporarily change the statement terminator to the sequence of any other character or characters that your trigger appears not in the body for example: (Note that the NOW ()
function, it's a literal string 'right now
END if
in the language after the block in the MySQL trigger Is. DELIMITER
? For example:
DELIMITER Reserve reserve reserved after RAR reservation _Ao_replace if new certificate-type = 1 / * in-app * / again in `message estity` (` Trip '), `FK`,` Sent time`, `status',` message_type`, `message`) value (nudrip, new pk, now),' submit ', 4,' this reservation Is an automated reply '); end if; END // DELIMITER;
;
). //
. DELIMITER
command is the underlying one of mysql clients. Dynamic SQL statements from your application.)
Comments
Post a Comment