samp.directory
← Scripts y librerías

maddinat0r/samp-mysql-yinline-include

[Deprecated] SA-MP PAWN include to support y_inline callbacks with BlueG's MySQL plugin

Herramienta★ 7actualizado may 2020MITSourcePawnsampctl
Abrir en GitHub

Instalar con sampctl

sampctl package install maddinat0r/samp-mysql-yinline-include

Ejecútalo en la carpeta de tu proyecto. sampctl descarga el paquete y sus dependencias.

Depende de 1 paquete

README.md

Deprecated

Warning: This include is deprecated and won't be updated for anything past YSI 5, as YSI 5.x now has built-in support for MySQL inline functions. The new functions are named slightly different, refer to the table below on what the new names are.

old namenew name
mysql_tquery_inlineMySQL_TQueryInline
mysql_pquery_inlineMySQL_PQueryInline
orm_select_inlineORM_SelectInline
orm_update_inlineORM_UpdateInline
orm_insert_inlineORM_InsertInline
orm_delete_inlineORM_DeleteInline
orm_load_inlineORM_LoadInline
orm_save_inlineORM_SaveInline

y_inline callbacks for BlueG's MySQL plugin

This is a SA-MP PAWN include which adds support for y_inline callbacks to be used with BlueG's MySQL plugin version R40 and higher. Simply include it in your gamemode and/or filterscript/s and you're ready to go.

Available functions:

mysql_tquery_inline(MySQL:handle, const query[], callback:Callback, const format[], {Float,_}:...);
mysql_pquery_inline(MySQL:handle, const query[], callback:Callback, const format[], {Float,_}:...);

orm_select_inline(ORM:id, callback:Callback, const format[], {Float,_}:...);
orm_update_inline(ORM:id, callback:Callback, const format[], {Float,_}:...);
orm_insert_inline(ORM:id, callback:Callback, const format[], {Float,_}:...);
orm_delete_inline(ORM:id, callback:Callback, const format[], {Float,_}:...);
orm_load_inline(ORM:id, callback:Callback, const format[], {Float,_}:...);
orm_save_inline(ORM:id, callback:Callback, const format[], {Float,_}:...);

Every function returns 0 in case of an error.

Example

#include <a_samp>
#include <a_mysql>
#include <a_mysql_yinline>

new MySQL:g_Mysql;

main() { }

public OnGameModeInit()
{
	inline InlineCallback(number, Float:flt, string:str[])
	{
		new value;
		if(!cache_get_value_int(0, 0, value))
			printf("some error happened, check the MySQL log!");
	}
	
	new ret = mysql_tquery_inline(
				g_Mysql, "SELECT 1", 
				using inline InlineCallback, "dfs", 23, 3.1424512, "banana");
		
	if(!ret)
		printf("some error happened, check the MySQL log!");
	
	return 1;
}

pawnsa-mp

Esta página se genera con lo que GitHub publica sobre el repositorio. samp.directory no aloja el código. Informar de un problema con esta ficha