Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function GetTextValue(uuid:text, n:text, sql:text) :: text:
- set {_result} to mysql result of query "SELECT `testuuid`,`testinsql` FROM %{_sql}% WHERE `testuuid` = '%{_uuid}%'"
- set {_result::*} to mysql string "%{_n}%" in {_result}
- return "%{_result::*}%"
- #SELECT `欄位` FROM `資料表` WHERE `特定欄位` LIKE 字串 ;
- #一般用法: SELECT `id`,`name` FROM `table` WHERE `name` LIKE 'admin' ;
- #Function GetNumberValue(p:player, n:text) :: number:
- command /123456:
- trigger:
- set {_result} to mysql result of query "SELECT * FROM testsql"
- set {_testinsql::*} to mysql string "testinsql" in {_result}
- set {_testuuid::*} to mysql string "testuuid" in {_result}
- send "testinsql: %{_testinsql::*}%" to player
- send "testuuid: %{_testuuid::*}%" to player
- command /test1:
- trigger:
- send GetTextValue(uuid of player, "testinsql", "testsql")
- command /test2:
- trigger:
- send GetTextValue(uuid of player, "testuuid", "testsql")
- command /test3:
- trigger:
- send GetTextValue("72361866-212A-40B7-B2E7-55EB057FF01E", "testinsql", "testsql")
- command /test4:
- trigger:
- send GetTextValue("72361866-212A-40B7-B2E7-55EB057FF01E", "testuuid", "testsql")
- command /87:
- trigger:
- mysql update "INSERT INTO testsql (`testuuid`, `testinsql`) VALUES ('%uuid of player%','100')"
- command /9487:
- trigger:
- mysql update "INSERT INTO testsql (`testuuid`, `testinsql`) VALUES ('72361866-212A-40B7-B2E7-55EB057FF01E','50')"
Advertisement
Add Comment
Please, Sign In to add comment