ExecuteSQLUpdate

From Multi Theft Auto: Wiki
Revision as of 15:06, 23 September 2006 by IJs (talk | contribs) (SetRegistryQuery moved to ExecuteSQLUpdate)
Jump to navigation Jump to search

This function sets one or more rows in the registry. Since the registry is powered by a SQLite database, this function automatically executes an UPDATE query with the appropriate parameters.

The registry is stored globally and can be read from and written to by all scripts in sessions. This is useful if you want to store data for your script.

The actual SQL query that is executed will be the following:

UPDATE <table> SET <set> WHERE <conditions>

Syntax

bool setRegistryQuery ( string table, string set, [ string conditions ] )

Required Arguments

  • table: The table you want to modify.
  • set: The query you want to execute on that table. The default SQL syntax is used, which means that the = is used to set a value and the ' is used to specify a value (e.g. test = 'hi' ). The , is used as a delimiter for multiple queries.

Optional Arguments

  • conditions: The conditions that need to be met before a specific row is changed.

Returns

The function returns a boolean which is true on success, and false on failure.

See Also