Query with Results

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
 
Line 15: Line 15:
 
</pre>
 
</pre>
  
[[File:database.png]]
+
[[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)
}

Query.jpg

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox