Modules/MySQL/MysqlQuery: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 14: Line 14:
===Callback Arguments===
===Callback Arguments===
Your callback function has to accept the following arguments:
Your callback function has to accept the following arguments:
*'''mysql_result''' rows : Returns the rows in a [[mysql_result]] array type
*'''bool''' result : Returns false on error, true on success
*'''bool''' result : Returns false on error, true on success
*'''mysql_result''' rows : Returns the rows in a [[mysql_result]] array type


===Optional Arguments===
===Optional Arguments===

Revision as of 21:53, 21 April 2006

Description

This functions queries the MySQL server through the MySQL connection that has been opened by mysqlOpen. The result of the query is then passed to the script by calling callback_function.

This function is provided by the ml_mysql module.

Syntax

bool mysqlQuery ( [string callback_function, string query] )

Required Arguments

  • callback_function : The function that is called if the operation is done (please see below)
  • query : The MySQL query that is sent

Callback Arguments

Your callback function has to accept the following arguments:

  • mysql_result rows : Returns the rows in a mysql_result array type
  • bool result : Returns false on error, true on success

Optional Arguments

None

Example

N/A yet