Repository navigation
The open.mp names now use whole words, with the verb first, as open.mp's own natives do, such as DB_ExecuteQuery. The snake_case names of R41 are unchanged, so a script written for R41 needs no change.
Changed
- A query with no values after it is sent as it is.
MySQL_QueryandMySQL_SendQueryformat the query only when values follow it, soMySQL_Query(handle, "SELECT ... LIKE 'a%'")runs unchanged. This holds formysql_tquery_format,mysql_pquery_format,mysql_query_format,mysql_send, the builder and transaction steps.mysql_formatformats as before. MySQL_ThreadedQueryandMySQL_ParallelQueryaremysql_tqueryandmysql_pquery, whose values go to the public.MySQL_Queryismysql_query_format, anduse_cachekeeps its default.
Breaking changes
Every open.mp name below changed. Replace the name on the left with the one on the right; the arguments stay the same.
| Before | Now |
|---|---|
MySQL_UnprocessedQueries |
MySQL_GetUnprocessedQueries |
MySQL_GlobalOptions |
MySQL_SetGlobalOption |
MySQL_InitOptions |
MySQL_CreateOptions |
MySQL_Log |
MySQL_SetLogLevel |
MySQL_Errno |
MySQL_GetErrorNumber |
MySQL_Error |
MySQL_GetError |
MySQL_Stat |
MySQL_GetStatus |
MySQL_Stats |
MySQL_GetStats |
MySQL_TQuery |
MySQL_ThreadedQuery |
MySQL_PQuery |
MySQL_ParallelQuery |
MySQL_TQueryFormat |
none, mysql_tquery_format stays |
MySQL_PQueryFormat |
none, mysql_pquery_format stays |
MySQL_QueryFormat |
MySQL_Query |
MySQL_Send |
MySQL_SendQuery |
MySQL_TQueryFile |
MySQL_ThreadedQueryFile |
Cache_AffectedRows |
Cache_GetAffectedRows |
Cache_InsertID |
Cache_GetInsertID |
Cache_WarningCount |
Cache_GetWarningCount |
Cache_GetQueryExecTime |
Cache_GetQueryExecutionTime |
Cache_GetErrno |
Cache_GetErrorNumber |
ORM_Errno |
ORM_GetError |
ORM_AddVarInt |
ORM_AddVariableInt |
ORM_AddVarFloat |
ORM_AddVariableFloat |
ORM_AddVarString |
ORM_AddVariableString |
ORM_ClearVars |
ORM_ClearVariables |
ORM_DelVar |
ORM_RemoveVariable |
MySQL_BuilderCreate |
MySQL_CreateBuilder |
MySQL_BuilderAppend |
MySQL_AppendBuilder |
MySQL_BuilderTrim |
MySQL_TrimBuilder |
MySQL_BuilderLength |
MySQL_GetBuilderLength |
MySQL_BuilderClear |
MySQL_ClearBuilder |
MySQL_BuilderDestroy |
MySQL_DestroyBuilder |
MySQL_BuilderTQuery |
MySQL_ThreadedQueryBuilder |
MySQL_BuilderPQuery |
MySQL_ParallelQueryBuilder |
MySQL_BuilderQuery |
MySQL_QueryBuilder |
MySQL_StmtPrepare |
MySQL_PrepareStatement |
MySQL_StmtExecute |
MySQL_ExecuteStatement |
MySQL_StmtQuery |
MySQL_QueryStatement |
MySQL_StmtClose |
MySQL_CloseStatement |
MySQL_BatchCreate |
MySQL_CreateBatch |
MySQL_BatchAddRow |
MySQL_AddBatchRow |
MySQL_BatchRows |
MySQL_GetBatchRows |
MySQL_BatchExecute |
MySQL_ExecuteBatch |
MySQL_BatchQuery |
MySQL_QueryBatch |
MySQL_BatchDestroy |
MySQL_DestroyBatch |
MySQL_TransactionCreate |
MySQL_CreateTransaction |
MySQL_TransactionAdd |
MySQL_AddTransactionQuery |
MySQL_TransactionAddStmt |
MySQL_AddTransactionStatement |
MySQL_TransactionSteps |
MySQL_GetTransactionSteps |
MySQL_TransactionExecute |
MySQL_ExecuteTransaction |
MySQL_TransactionQuery |
MySQL_QueryTransaction |
MySQL_TransactionDestroy |
MySQL_DestroyTransaction |
MySQL_Argon2Costs |
MySQL_SetArgon2Costs |
MySQL_BcryptCost |
MySQL_SetBcryptCost |
Cache_NumRows |
Cache_CountRows |
Cache_NumFields |
Cache_CountFields |
Cache_NumResults |
Cache_CountResults |
Cache_GetValue |
none, use Cache_GetValueName |
Cache_GetValueInt |
none, use Cache_GetValueNameInt |
Cache_GetValueFloat |
none, use Cache_GetValueNameFloat |
Cache_GetValueBool |
none, use Cache_GetValueNameBool |
Cache_IsValueNull |
none, use Cache_IsValueNameNull |
Installation
Place mysql.dll or mysql.so in components on open.mp, or in plugins on SA-MP, and mysql.inc in the include folder of the compiler. See the wiki.