Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- array (size=62)
- 'raw' => string 'CREATE TRIGGER `BEFORE_inst_master_INSERT` BEFORE INSERT ON `inst_master`
- FOR EACH ROW BEGIN
- SET @cnt=(SELECT count(*) FROM inst_master WHERE inst_name=NEW.inst_name OR inst_code=NEW.inst_code LIMIT 1);
- IF @cnt<>0 THEN
- SET NEW.inst_id=1;
- END IF;
- END' (length=250)
- 0 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'CREATE' (length=6)
- 'pos' => int 6
- 'forbidden' => boolean true
- 1 =>
- array (size=4)
- 'type' => string 'alpha_identifier' (length=16)
- 'data' => string 'TRIGGER' (length=7)
- 'pos' => int 14
- 'forbidden' => boolean false
- 2 =>
- array (size=3)
- 'type' => string 'quote_backtick' (length=14)
- 'data' => string '`BEFORE_inst_master_INSERT`' (length=27)
- 'pos' => int 0
- 3 =>
- array (size=4)
- 'type' => string 'alpha_identifier' (length=16)
- 'data' => string 'BEFORE' (length=6)
- 'pos' => int 49
- 'forbidden' => boolean false
- 4 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'INSERT' (length=6)
- 'pos' => int 56
- 'forbidden' => boolean true
- 5 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'ON' (length=2)
- 'pos' => int 59
- 'forbidden' => boolean true
- 6 =>
- array (size=3)
- 'type' => string 'quote_backtick' (length=14)
- 'data' => string '`inst_master`' (length=13)
- 'pos' => int 0
- 7 =>
- array (size=3)
- 'type' => string 'white_newline' (length=13)
- 'data' => string '' (length=0)
- 'pos' => int 0
- 8 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'FOR' (length=3)
- 'pos' => int 78
- 'forbidden' => boolean true
- 9 =>
- array (size=4)
- 'type' => string 'alpha_identifier' (length=16)
- 'data' => string 'EACH' (length=4)
- 'pos' => int 83
- 'forbidden' => boolean false
- 10 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'ROW' (length=3)
- 'pos' => int 87
- 'forbidden' => boolean false
- 11 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'BEGIN' (length=5)
- 'pos' => int 93
- 'forbidden' => boolean false
- 12 =>
- array (size=3)
- 'type' => string 'white_newline' (length=13)
- 'data' => string '' (length=0)
- 'pos' => int 0
- 13 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'SET' (length=3)
- 'pos' => int 97
- 'forbidden' => boolean true
- 14 =>
- array (size=3)
- 'type' => string 'alpha_variable' (length=14)
- 'data' => string '@cnt' (length=4)
- 'pos' => int 102
- 15 =>
- array (size=3)
- 'type' => string 'punct' (length=5)
- 'data' => string '=' (length=1)
- 'pos' => int 0
- 16 =>
- array (size=3)
- 'type' => string 'punct_bracket_open_round' (length=24)
- 'data' => string '(' (length=1)
- 'pos' => int 0
- 17 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'SELECT' (length=6)
- 'pos' => int 110
- 'forbidden' => boolean true
- 18 =>
- array (size=4)
- 'type' => string 'alpha_functionName' (length=18)
- 'data' => string 'count' (length=5)
- 'pos' => int 116
- 'forbidden' => boolean false
- 19 =>
- array (size=3)
- 'type' => string 'punct_bracket_open_round' (length=24)
- 'data' => string '(' (length=1)
- 'pos' => int 0
- 20 =>
- array (size=3)
- 'type' => string 'punct' (length=5)
- 'data' => string '*' (length=1)
- 'pos' => int 0
- 21 =>
- array (size=3)
- 'type' => string 'punct_bracket_close_round' (length=25)
- 'data' => string ')' (length=1)
- 'pos' => int 0
- 22 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'FROM' (length=4)
- 'pos' => int 124
- 'forbidden' => boolean true
- 23 =>
- array (size=4)
- 'type' => string 'alpha_identifier' (length=16)
- 'data' => string 'inst_master' (length=11)
- 'pos' => int 136
- 'forbidden' => boolean false
- 24 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'WHERE' (length=5)
- 'pos' => int 142
- 'forbidden' => boolean true
- 25 =>
- array (size=4)
- 'type' => string 'alpha_identifier' (length=16)
- 'data' => string 'inst_name' (length=9)
- 'pos' => int 152
- 'forbidden' => boolean false
- 26 =>
- array (size=3)
- 'type' => string 'punct' (length=5)
- 'data' => string '=' (length=1)
- 'pos' => int 0
- 27 =>
- array (size=4)
- 'type' => string 'alpha_identifier' (length=16)
- 'data' => string 'NEW' (length=3)
- 'pos' => int 156
- 'forbidden' => boolean false
- 28 =>
- array (size=3)
- 'type' => string 'punct_qualifier' (length=15)
- 'data' => string '.' (length=1)
- 'pos' => int 0
- 29 =>
- array (size=4)
- 'type' => string 'alpha_identifier' (length=16)
- 'data' => string 'inst_name' (length=9)
- 'pos' => int 166
- 'forbidden' => boolean false
- 30 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'OR' (length=2)
- 'pos' => int 169
- 'forbidden' => boolean true
- 31 =>
- array (size=4)
- 'type' => string 'alpha_identifier' (length=16)
- 'data' => string 'inst_code' (length=9)
- 'pos' => int 179
- 'forbidden' => boolean false
- 32 =>
- array (size=3)
- 'type' => string 'punct' (length=5)
- 'data' => string '=' (length=1)
- 'pos' => int 0
- 33 =>
- array (size=4)
- 'type' => string 'alpha_identifier' (length=16)
- 'data' => string 'NEW' (length=3)
- 'pos' => int 183
- 'forbidden' => boolean false
- 34 =>
- array (size=3)
- 'type' => string 'punct_qualifier' (length=15)
- 'data' => string '.' (length=1)
- 'pos' => int 0
- 35 =>
- array (size=4)
- 'type' => string 'alpha_identifier' (length=16)
- 'data' => string 'inst_code' (length=9)
- 'pos' => int 193
- 'forbidden' => boolean false
- 36 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'LIMIT' (length=5)
- 'pos' => int 199
- 'forbidden' => boolean true
- 37 =>
- array (size=3)
- 'type' => string 'digit_integer' (length=13)
- 'data' => string '1' (length=1)
- 'pos' => int 201
- 38 =>
- array (size=3)
- 'type' => string 'punct_bracket_close_round' (length=25)
- 'data' => string ')' (length=1)
- 'pos' => int 0
- 39 =>
- array (size=3)
- 'type' => string 'punct_queryend' (length=14)
- 'data' => string ';' (length=1)
- 'pos' => int 0
- 40 =>
- array (size=3)
- 'type' => string 'white_newline' (length=13)
- 'data' => string '' (length=0)
- 'pos' => int 0
- 41 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'IF' (length=2)
- 'pos' => int 206
- 'forbidden' => boolean true
- 42 =>
- array (size=3)
- 'type' => string 'alpha_variable' (length=14)
- 'data' => string '@cnt' (length=4)
- 'pos' => int 211
- 43 =>
- array (size=3)
- 'type' => string 'punct' (length=5)
- 'data' => string '<>' (length=2)
- 'pos' => int 0
- 44 =>
- array (size=3)
- 'type' => string 'digit_integer' (length=13)
- 'data' => string '0' (length=1)
- 'pos' => int 214
- 45 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'THEN' (length=4)
- 'pos' => int 219
- 'forbidden' => boolean true
- 46 =>
- array (size=3)
- 'type' => string 'white_newline' (length=13)
- 'data' => string '' (length=0)
- 'pos' => int 0
- 47 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'SET' (length=3)
- 'pos' => int 223
- 'forbidden' => boolean true
- 48 =>
- array (size=4)
- 'type' => string 'alpha_identifier' (length=16)
- 'data' => string 'NEW' (length=3)
- 'pos' => int 227
- 'forbidden' => boolean false
- 49 =>
- array (size=3)
- 'type' => string 'punct_qualifier' (length=15)
- 'data' => string '.' (length=1)
- 'pos' => int 0
- 50 =>
- array (size=4)
- 'type' => string 'alpha_identifier' (length=16)
- 'data' => string 'inst_id' (length=7)
- 'pos' => int 235
- 'forbidden' => boolean false
- 51 =>
- array (size=3)
- 'type' => string 'punct' (length=5)
- 'data' => string '=' (length=1)
- 'pos' => int 0
- 52 =>
- array (size=3)
- 'type' => string 'digit_integer' (length=13)
- 'data' => string '1' (length=1)
- 'pos' => int 237
- 53 =>
- array (size=3)
- 'type' => string 'punct_queryend' (length=14)
- 'data' => string ';' (length=1)
- 'pos' => int 0
- 54 =>
- array (size=3)
- 'type' => string 'white_newline' (length=13)
- 'data' => string '' (length=0)
- 'pos' => int 0
- 55 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'END' (length=3)
- 'pos' => int 242
- 'forbidden' => boolean false
- 56 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'IF' (length=2)
- 'pos' => int 245
- 'forbidden' => boolean true
- 57 =>
- array (size=3)
- 'type' => string 'punct_queryend' (length=14)
- 'data' => string ';' (length=1)
- 'pos' => int 0
- 58 =>
- array (size=3)
- 'type' => string 'white_newline' (length=13)
- 'data' => string '' (length=0)
- 'pos' => int 0
- 59 =>
- array (size=4)
- 'type' => string 'alpha_reservedWord' (length=18)
- 'data' => string 'END' (length=3)
- 'pos' => int 250
- 'forbidden' => boolean false
- 'len' => int 60
Add Comment
Please, Sign In to add comment