Query
From UBot Studio
(Difference between revisions)
(→Example) |
|||
| (4 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | Query is a [[Database Commands|Database Command]]. | |
* This command is used for running a query against a database. | * This command is used for running a query against a database. | ||
| Line 15: | Line 15: | ||
} | } | ||
</pre> | </pre> | ||
| + | |||
| + | [[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)
}
