Query
From UBot Studio
(Difference between revisions)
(→Example) |
(→Example) |
||
Line 16: | Line 16: | ||
</pre> | </pre> | ||
− | [[File: | + | [[File:query.jpg]] |
Latest revision as of 17:03, 26 September 2013
Query is a Database Command.
- This command is used for running a query against a database.
- It is only usable inside of a connect to database Command.
- No results are returned from running this command, so it can be used for INSERT/UPDATE/DELETE queries.
- The Query parameter is used for typing your SQL query such as DELETE FROM table_name;
[edit] Example
plugin command("DatabaseCommands.dll", "connect to database", "server=localhost;uid=test; pwd=testing; database=mysql; port=3306; pooling=false") { plugin command("DatabaseCommands.dll", "query", "INSERT INTO users VALUES (\'ubot\', \'studio\');") plugin command("DatabaseCommands.dll", "query with results", "SELECT * FROM users WHERE username = \'ubot\';", &users) }