Guest User

MySQL R5 BlueG SA:MP - Upload by iEnerqie

a guest
Oct 29th, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. /*
  2. SA-MP MySQL plugin R5
  3. Copyright (c) 2008-2010, G-sTyLeZzZ
  4. */
  5.  
  6. #if defined mysql_included
  7. #endinput
  8. #endif
  9. #define mysql_included
  10.  
  11. //Common error codes (http://dev.mysql.com/doc/refman/5.0/en/error-messages-(client|server).html)
  12.  
  13. #define ER_DBACCESS_DENIED_ERROR 1044
  14. #define ER_ACCESS_DENIED_ERROR 1045
  15. #define ER_UNKNOWN_TABLE 1109
  16. #define ER_SYNTAX_ERROR 1149
  17. #define CR_SERVER_GONE_ERROR 2006
  18. #define CR_SERVER_LOST 2013
  19. #define CR_COMMAND_OUT_OF_SYNC 2014
  20. #define CR_SERVER_LOST_EXTENDED 2055
  21.  
  22. //Native functions
  23.  
  24. #define mysql_fetch_row(%1) mysql_fetch_row_format(%1,"|")
  25. #define mysql_next_row() mysql_retrieve_row()
  26. #define mysql_get_field(%1,%2) mysql_fetch_field_row(%2,%1)
  27.  
  28. native mysql_affected_rows(connectionHandle = 1);
  29. native mysql_close(connectionHandle = 1);
  30. native mysql_connect(const host[],const user[],const database[],const password[]);
  31. native mysql_debug(enable = 1);
  32. native mysql_errno(connectionHandle = 1);
  33. native mysql_fetch_int(connectionHandle = 1);
  34. native mysql_fetch_field(number,dest[],connectionHandle = 1);
  35. native mysql_fetch_field_row(string[],const fieldname[],connectionHandle = 1);
  36. native mysql_fetch_float(&Float:result,connectionHandle = 1);
  37. native mysql_fetch_row_format(string[],const delimiter[] = "|",connectionHandle = 1);
  38. native mysql_field_count(connectionHandle = 1);
  39. native mysql_free_result(connectionHandle = 1);
  40. native mysql_get_charset(destination[],connectionHandle = 1);
  41. native mysql_insert_id(connectionHandle = 1);
  42. native mysql_num_rows(connectionHandle = 1);
  43. native mysql_num_fields(connectionHandle = 1);
  44. native mysql_ping(connectionHandle = 1);
  45. native mysql_query(query[],resultid = (-1),extraid = (-1),connectionHandle = 1);
  46. native mysql_query_callback(index,query[],callback[],extraid = (-1),connectionHandle = 1);
  47. native mysql_real_escape_string(const source[],destination[],connectionHandle = 1);
  48. native mysql_reconnect(connectionHandle = 1);
  49. native mysql_reload(connectionHandle = 1);
  50. native mysql_retrieve_row(connectionHandle = 1);
  51. native mysql_set_charset(charset[],connectionHandle = 1);
  52. native mysql_stat(const destination[],connectionHandle = 1);
  53. native mysql_store_result(connectionHandle = 1);
  54. native mysql_warning_count(connectionHandle = 1);
  55.  
  56. //forward declarations
  57.  
  58. forward OnQueryFinish(query[], resultid, extraid, connectionHandle);
  59. forward OnQueryError(errorid, error[], resultid, extraid, callback[], query[], connectionHandle);
Add Comment
Please, Sign In to add comment