a_mysql.inc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /**
  2. *
  3. * MySQL Native Functions
  4. * More information about the function usage at mysql.com
  5. *
  6. **/
  7. #if defined mysql_included
  8. #endinput
  9. #endif
  10. #define mysql_included
  11. #include <a_samp>
  12. #include <a_sampmysql>
  13. //Definitions
  14. #define mysql_fetch_row(%1) mysql_fetch_row_format(%1,"|")
  15. #define mysql_get_field(%1,%2) mysql_fetch_field_row(%2,%1)
  16. //Native functions
  17. native mysql_affected_rows(connectionHandle = 1);
  18. native mysql_close(connectionHandle = 1);
  19. native mysql_connect(const host[],const user[],const database[],const password[]);
  20. native mysql_debug(enable = 1);
  21. native mysql_errno(connectionHandle = 1);
  22. native mysql_fetch_int(connectionHandle = 1);
  23. native mysql_fetch_field(number,dest[],connectionHandle = 1);
  24. native mysql_fetch_field_row(string[],const fieldname[],connectionHandle = 1);
  25. native mysql_fetch_float(&Float:result,connectionHandle = 1);
  26. native mysql_fetch_row_format(string[],const delimiter[] = "|",connectionHandle = 1);
  27. native mysql_field_count(connectionHandle = 1);
  28. native mysql_free_result(connectionHandle = 1);
  29. native mysql_get_charset(destination[],connectionHandle = 1);
  30. native mysql_insert_id(connectionHandle = 1);
  31. native mysql_num_rows(connectionHandle = 1);
  32. native mysql_num_fields(connectionHandle = 1);
  33. native mysql_ping(connectionHandle = 1);
  34. native mysql_query(query[],resultid = (-1),extraid = (-1),connectionHandle = 1);
  35. native mysql_real_escape_string(const source[],destination[],connectionHandle = 1);
  36. native mysql_reconnect(connectionHandle = 1);
  37. native mysql_reload(connectionHandle = 1) = mysql_reconnect;
  38. native mysql_set_charset(charset[],connectionHandle = 1);
  39. native mysql_stat(const destination[],connectionHandle = 1);
  40. native mysql_store_result(connectionHandle = 1);
  41. native mysql_warning_count(connectionHandle = 1);
  42. //Callback
  43. forward OnQueryFinish(query[], resultid, extraid, connectionHandle);