Modules/MySQL: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 4: Line 4:
The MySQL module provides access to MySQL servers. It is included with [http://files.mtasa.com/apps/1.0/dm/ml_devkit.tar.gz the original module SDK package].
The MySQL module provides access to MySQL servers. It is included with [http://files.mtasa.com/apps/1.0/dm/ml_devkit.tar.gz the original module SDK package].
=== Functions ===
=== Functions ===
bool [[Modules/MySQL/MysqlCreate|mysqlCreate]] ( nil )
<syntaxhighlight lang="lua">bool [[Modules/MySQL/MysqlCreate|mysqlCreate]] ( nil )</syntaxhighlight>


bool [[Modules/MySQL/MysqlOpen|mysqlOpen]] ( mysql, function, host, user, password, database name, port )
<syntaxhighlight lang="lua">bool [[Modules/MySQL/MysqlOpen|mysqlOpen]] ( mysql, function, host, user, password, database name, port )</syntaxhighlight>


nil [[Modules/MySQL/MysqlDestroy|mysqlDestroy]] ( mysql )
<syntaxhighlight lang="lua">nil [[Modules/MySQL/MysqlDestroy|mysqlDestroy]] ( mysql )</syntaxhighlight>


bool [[Modules/MySQL/MysqlQuery|mysqlQuery]] ( mysql, function, query )
<syntaxhighlight lang="lua">bool [[Modules/MySQL/MysqlQuery|mysqlQuery]] ( mysql, function, query )</syntaxhighlight>


string [[Modules/MySQL/MysqlSafeString|mysqlSafeString]] ( string )
<syntaxhighlight lang="lua">string [[Modules/MySQL/MysqlSafeString|mysqlSafeString]] ( string )</syntaxhighlight>


[[Category:Modules]]
[[Category:Modules]]


[[ru:Modules/MySQL]]
[[ru:Modules/MySQL]]

Revision as of 17:56, 18 September 2016

Dialog-information.png This article is (partially) outdated and the information may no longer apply.

Reason: MTA now supports MySQL databases natively via the db* functions.

Available for Windows and Linux servers

The MySQL module provides access to MySQL servers. It is included with the original module SDK package.

Functions

bool [[Modules/MySQL/MysqlCreate|mysqlCreate]] ( nil )
bool [[Modules/MySQL/MysqlOpen|mysqlOpen]] ( mysql, function, host, user, password, database name, port )
nil [[Modules/MySQL/MysqlDestroy|mysqlDestroy]] ( mysql )
bool [[Modules/MySQL/MysqlQuery|mysqlQuery]] ( mysql, function, query )
string [[Modules/MySQL/MysqlSafeString|mysqlSafeString]] ( string )