Query with Results
From UBot Studio
				
								
				(Difference between revisions)
				
																
				
				
								
				| (2 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | Query with Results is a [[Database Commands|Database Command]]. | |
| * This command is used for running a query against a database and returning the results into a table. | * This command is used for running a query against a database and returning the results into a table. | ||
| Line 14: | Line 14: | ||
| } | } | ||
| </pre> | </pre> | ||
| + | |||
| + | [[File:query.jpg]] | ||
Latest revision as of 17:05, 26 September 2013
Query with Results is a Database Command.
- This command is used for running a query against a database and returning the results into a table.
- It is only usable inside of a connect to database Command.
- The Query parameter is used for typing your SQL query such as SELECT * FROM table_name;
- The Table parameter is used for defining the table where the results of your query will be stored.
[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)
}

