mysqli_fe.c 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 7 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2018 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Authors: Georg Richter <georg@php.net> |
  16. | Andrey Hristov <andrey@php.net> |
  17. | Ulf Wendel <uw@php.net> |
  18. +----------------------------------------------------------------------+
  19. */
  20. #ifdef HAVE_CONFIG_H
  21. #include "config.h"
  22. #endif
  23. #include <signal.h>
  24. #include "php.h"
  25. #include "php_ini.h"
  26. #include "ext/standard/info.h"
  27. #include "php_mysqli_structs.h"
  28. #include "mysqli_fe.h"
  29. #include "mysqli_priv.h"
  30. #ifdef MYSQLI_USE_FULL_TYPED_ARGINFO_0
  31. #define MYSQLI_ZEND_ARG_OBJ_INFO_LINK() ZEND_ARG_OBJ_INFO(0, link, mysqli, 0)
  32. #define MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0)
  33. #define MYSQLI_ZEND_ARG_OBJ_INFO_STMT() ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0)
  34. #else
  35. #define MYSQLI_ZEND_ARG_OBJ_INFO_LINK() ZEND_ARG_INFO(0, link)
  36. #define MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() ZEND_ARG_INFO(0, result)
  37. #define MYSQLI_ZEND_ARG_OBJ_INFO_STMT() ZEND_ARG_INFO(0, stmt)
  38. #endif
  39. ZEND_BEGIN_ARG_INFO(arginfo_mysqli_stmt_bind_result, 0)
  40. MYSQLI_ZEND_ARG_OBJ_INFO_STMT()
  41. ZEND_ARG_VARIADIC_INFO(1, vars)
  42. ZEND_END_ARG_INFO()
  43. ZEND_BEGIN_ARG_INFO(arginfo_mysqli_stmt_bind_param, 0)
  44. MYSQLI_ZEND_ARG_OBJ_INFO_STMT()
  45. ZEND_ARG_INFO(0, types)
  46. ZEND_ARG_VARIADIC_INFO(1, vars)
  47. ZEND_END_ARG_INFO()
  48. ZEND_BEGIN_ARG_INFO(arginfo_class_mysqli_stmt_bind_result, 0)
  49. ZEND_ARG_VARIADIC_INFO(1, vars)
  50. ZEND_END_ARG_INFO()
  51. ZEND_BEGIN_ARG_INFO(arginfo_class_mysqli_stmt_bind_param, 0)
  52. ZEND_ARG_INFO(0, types)
  53. ZEND_ARG_VARIADIC_INFO(1, vars)
  54. ZEND_END_ARG_INFO()
  55. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_poll, 0, 0, 4)
  56. ZEND_ARG_ARRAY_INFO(1, read, 1)
  57. ZEND_ARG_ARRAY_INFO(1, write, 1)
  58. ZEND_ARG_ARRAY_INFO(1, error, 1)
  59. ZEND_ARG_INFO(0, sec)
  60. ZEND_ARG_INFO(0, usec)
  61. ZEND_END_ARG_INFO()
  62. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_no_params, 0, 0, 0)
  63. ZEND_END_ARG_INFO()
  64. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_only_link, 0, 0, 1)
  65. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  66. ZEND_END_ARG_INFO()
  67. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_autocommit, 0, 0, 2)
  68. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  69. ZEND_ARG_INFO(0, mode)
  70. ZEND_END_ARG_INFO()
  71. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_autocommit, 0, 0, 1)
  72. ZEND_ARG_INFO(0, mode)
  73. ZEND_END_ARG_INFO()
  74. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_begin_transaction, 0, 0, 1)
  75. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  76. ZEND_ARG_INFO(0, flags)
  77. ZEND_ARG_INFO(0, name)
  78. ZEND_END_ARG_INFO()
  79. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_begin_transaction, 0, 0, 0)
  80. ZEND_ARG_INFO(0, flags)
  81. ZEND_ARG_INFO(0, name)
  82. ZEND_END_ARG_INFO()
  83. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_savepoint, 0, 0, 2)
  84. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  85. ZEND_ARG_INFO(0, name)
  86. ZEND_END_ARG_INFO()
  87. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_savepoint, 0, 0, 1)
  88. ZEND_ARG_INFO(0, name)
  89. ZEND_END_ARG_INFO()
  90. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_release_savepoint, 0, 0, 2)
  91. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  92. ZEND_ARG_INFO(0, name)
  93. ZEND_END_ARG_INFO()
  94. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_release_savepoint, 0, 0, 1)
  95. ZEND_ARG_INFO(0, name)
  96. ZEND_END_ARG_INFO()
  97. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_commit, 0, 0, 1)
  98. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  99. ZEND_ARG_INFO(0, flags)
  100. ZEND_ARG_INFO(0, name)
  101. ZEND_END_ARG_INFO()
  102. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_commit, 0, 0, 0)
  103. ZEND_ARG_INFO(0, flags)
  104. ZEND_ARG_INFO(0, name)
  105. ZEND_END_ARG_INFO()
  106. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_rollback, 0, 0, 1)
  107. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  108. ZEND_ARG_INFO(0, flags)
  109. ZEND_ARG_INFO(0, name)
  110. ZEND_END_ARG_INFO()
  111. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_rollback, 0, 0, 0)
  112. ZEND_ARG_INFO(0, flags)
  113. ZEND_ARG_INFO(0, name)
  114. ZEND_END_ARG_INFO()
  115. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_store_result, 0, 0, 1)
  116. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  117. ZEND_ARG_INFO(0, flags)
  118. ZEND_END_ARG_INFO()
  119. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_store_result, 0, 0, 0)
  120. ZEND_ARG_INFO(0, flags)
  121. ZEND_END_ARG_INFO()
  122. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_change_user, 0, 0, 4)
  123. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  124. ZEND_ARG_INFO(0, user)
  125. ZEND_ARG_INFO(0, password)
  126. ZEND_ARG_INFO(0, database)
  127. ZEND_END_ARG_INFO()
  128. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_change_user, 0, 0, 3)
  129. ZEND_ARG_INFO(0, user)
  130. ZEND_ARG_INFO(0, password)
  131. ZEND_ARG_INFO(0, database)
  132. ZEND_END_ARG_INFO()
  133. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_connect, 0, 0, 0)
  134. ZEND_ARG_INFO(0, host)
  135. ZEND_ARG_INFO(0, user)
  136. ZEND_ARG_INFO(0, password)
  137. ZEND_ARG_INFO(0, database)
  138. ZEND_ARG_INFO(0, port)
  139. ZEND_ARG_INFO(0, socket)
  140. ZEND_END_ARG_INFO()
  141. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_real_connect, 0, 0, 1)
  142. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  143. ZEND_ARG_INFO(0, host)
  144. ZEND_ARG_INFO(0, user)
  145. ZEND_ARG_INFO(0, password)
  146. ZEND_ARG_INFO(0, database)
  147. ZEND_ARG_INFO(0, port)
  148. ZEND_ARG_INFO(0, socket)
  149. ZEND_ARG_INFO(0, flags)
  150. ZEND_END_ARG_INFO()
  151. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_connect, 0, 0, 0)
  152. ZEND_ARG_INFO(0, host)
  153. ZEND_ARG_INFO(0, user)
  154. ZEND_ARG_INFO(0, password)
  155. ZEND_ARG_INFO(0, database)
  156. ZEND_ARG_INFO(0, port)
  157. ZEND_ARG_INFO(0, socket)
  158. ZEND_ARG_INFO(0, flags)
  159. ZEND_END_ARG_INFO()
  160. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_only_result, 0, 0, 1)
  161. MYSQLI_ZEND_ARG_OBJ_INFO_RESULT()
  162. ZEND_END_ARG_INFO()
  163. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_only_statement, 0, 0, 1)
  164. MYSQLI_ZEND_ARG_OBJ_INFO_STMT()
  165. ZEND_END_ARG_INFO()
  166. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_data_seek, 0, 0, 2)
  167. MYSQLI_ZEND_ARG_OBJ_INFO_RESULT()
  168. ZEND_ARG_INFO(0, offset)
  169. ZEND_END_ARG_INFO()
  170. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_data_seek, 0, 0, 2)
  171. MYSQLI_ZEND_ARG_OBJ_INFO_STMT()
  172. ZEND_ARG_INFO(0, offset)
  173. ZEND_END_ARG_INFO()
  174. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_data_seek, 0, 0, 1)
  175. ZEND_ARG_INFO(0, offset)
  176. ZEND_END_ARG_INFO()
  177. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_debug, 0, 0, 1)
  178. ZEND_ARG_INFO(0, debug_options)
  179. ZEND_END_ARG_INFO()
  180. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_result_and_fieldnr, 0, 0, 2)
  181. MYSQLI_ZEND_ARG_OBJ_INFO_RESULT()
  182. ZEND_ARG_INFO(0, field_nr)
  183. ZEND_END_ARG_INFO()
  184. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_and_fieldnr, 0, 0, 1)
  185. ZEND_ARG_INFO(0, field_nr)
  186. ZEND_END_ARG_INFO()
  187. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_fetch_array, 0, 0, 1)
  188. MYSQLI_ZEND_ARG_OBJ_INFO_RESULT()
  189. ZEND_ARG_INFO(0, result_type)
  190. ZEND_END_ARG_INFO()
  191. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_fetch_array, 0, 0, 0)
  192. ZEND_ARG_INFO(0, result_type)
  193. ZEND_END_ARG_INFO()
  194. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_fetch_object, 0, 0, 1)
  195. MYSQLI_ZEND_ARG_OBJ_INFO_RESULT()
  196. ZEND_ARG_INFO(0, class_name)
  197. ZEND_ARG_ARRAY_INFO(0, params, 0)
  198. ZEND_END_ARG_INFO()
  199. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_fetch_object, 0, 0, 0)
  200. ZEND_ARG_INFO(0, class_name)
  201. ZEND_ARG_ARRAY_INFO(0, params, 0)
  202. ZEND_END_ARG_INFO()
  203. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_kill, 0, 0, 2)
  204. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  205. ZEND_ARG_INFO(0, connection_id)
  206. ZEND_END_ARG_INFO()
  207. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_kill, 0, 0, 1)
  208. ZEND_ARG_INFO(0, connection_id)
  209. ZEND_END_ARG_INFO()
  210. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_query, 0, 0, 2)
  211. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  212. ZEND_ARG_INFO(0, query)
  213. ZEND_ARG_INFO(0, resultmode)
  214. ZEND_END_ARG_INFO()
  215. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_multi_query, 0, 0, 1)
  216. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  217. ZEND_ARG_INFO(0, query)
  218. ZEND_END_ARG_INFO()
  219. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_real_query, 0, 0, 1)
  220. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  221. ZEND_ARG_INFO(0, query)
  222. ZEND_END_ARG_INFO()
  223. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_prepare, 0, 0, 2)
  224. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  225. ZEND_ARG_INFO(0, query)
  226. ZEND_END_ARG_INFO()
  227. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_prepare, 0, 0, 2)
  228. MYSQLI_ZEND_ARG_OBJ_INFO_STMT()
  229. ZEND_ARG_INFO(0, query)
  230. ZEND_END_ARG_INFO()
  231. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_query, 0, 0, 1)
  232. ZEND_ARG_INFO(0, query)
  233. ZEND_ARG_INFO(0, resultmode)
  234. ZEND_END_ARG_INFO()
  235. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_prepare, 0, 0, 1)
  236. ZEND_ARG_INFO(0, query)
  237. ZEND_END_ARG_INFO()
  238. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_multi_query, 0, 0, 1)
  239. ZEND_ARG_INFO(0, query)
  240. ZEND_END_ARG_INFO()
  241. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_query, 0, 0, 1)
  242. ZEND_ARG_INFO(0, query)
  243. ZEND_END_ARG_INFO()
  244. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_options, 0, 0, 3)
  245. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  246. ZEND_ARG_INFO(0, option)
  247. ZEND_ARG_INFO(0, value)
  248. ZEND_END_ARG_INFO()
  249. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_options, 0, 0, 2)
  250. ZEND_ARG_INFO(0, option)
  251. ZEND_ARG_INFO(0, value)
  252. ZEND_END_ARG_INFO()
  253. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_report, 0, 0, 1)
  254. ZEND_ARG_INFO(0, flags)
  255. ZEND_END_ARG_INFO()
  256. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_real_escape_string, 0, 0, 2)
  257. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  258. ZEND_ARG_INFO(0, string_to_escape)
  259. ZEND_END_ARG_INFO()
  260. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_escape_string, 0, 0, 1)
  261. ZEND_ARG_INFO(0, string_to_escape)
  262. ZEND_END_ARG_INFO()
  263. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_select_db, 0, 0, 2)
  264. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  265. ZEND_ARG_INFO(0, database)
  266. ZEND_END_ARG_INFO()
  267. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_select_db, 0, 0, 1)
  268. ZEND_ARG_INFO(0, database)
  269. ZEND_END_ARG_INFO()
  270. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_set_charset, 0, 0, 2)
  271. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  272. ZEND_ARG_INFO(0, charset)
  273. ZEND_END_ARG_INFO()
  274. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_set_charset, 0, 0, 1)
  275. ZEND_ARG_INFO(0, charset)
  276. ZEND_END_ARG_INFO()
  277. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_attr_get, 0, 0, 2)
  278. MYSQLI_ZEND_ARG_OBJ_INFO_STMT()
  279. ZEND_ARG_INFO(0, attribute)
  280. ZEND_END_ARG_INFO()
  281. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_attr_get, 0, 0, 1)
  282. ZEND_ARG_INFO(0, attribute)
  283. ZEND_END_ARG_INFO()
  284. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_attr_set, 0, 0, 3)
  285. MYSQLI_ZEND_ARG_OBJ_INFO_STMT()
  286. ZEND_ARG_INFO(0, attribute)
  287. ZEND_ARG_INFO(0, value)
  288. ZEND_END_ARG_INFO()
  289. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_attr_set, 0, 0, 2)
  290. ZEND_ARG_INFO(0, attribute)
  291. ZEND_ARG_INFO(0, value)
  292. ZEND_END_ARG_INFO()
  293. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_send_long_data, 0, 0, 3)
  294. MYSQLI_ZEND_ARG_OBJ_INFO_STMT()
  295. ZEND_ARG_INFO(0, param_nr)
  296. ZEND_ARG_INFO(0, data)
  297. ZEND_END_ARG_INFO()
  298. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_send_long_data, 0, 0, 2)
  299. ZEND_ARG_INFO(0, param_nr)
  300. ZEND_ARG_INFO(0, data)
  301. ZEND_END_ARG_INFO()
  302. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_ssl_set, 0, 0, 6)
  303. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  304. ZEND_ARG_INFO(0, key)
  305. ZEND_ARG_INFO(0, cert)
  306. ZEND_ARG_INFO(0, certificate_authority)
  307. ZEND_ARG_INFO(0, certificate_authority_path)
  308. ZEND_ARG_INFO(0, cipher)
  309. ZEND_END_ARG_INFO()
  310. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_ssl_set, 0, 0, 5)
  311. ZEND_ARG_INFO(0, key)
  312. ZEND_ARG_INFO(0, cert)
  313. ZEND_ARG_INFO(0, certificate_authority)
  314. ZEND_ARG_INFO(0, certificate_authority_path)
  315. ZEND_ARG_INFO(0, cipher)
  316. ZEND_END_ARG_INFO()
  317. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_refresh, 0, 0, 2)
  318. MYSQLI_ZEND_ARG_OBJ_INFO_LINK()
  319. ZEND_ARG_INFO(0, options)
  320. ZEND_END_ARG_INFO()
  321. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_refresh, 0, 0, 1)
  322. ZEND_ARG_INFO(0, options)
  323. ZEND_END_ARG_INFO()
  324. ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_no_options, 0, 0, 0)
  325. ZEND_END_ARG_INFO()
  326. /* {{{ mysqli_functions[]
  327. *
  328. * Every user visible function must have an entry in mysqli_functions[].
  329. */
  330. const zend_function_entry mysqli_functions[] = {
  331. PHP_FE(mysqli_affected_rows, arginfo_mysqli_only_link)
  332. PHP_FE(mysqli_autocommit, arginfo_mysqli_autocommit)
  333. PHP_FE(mysqli_begin_transaction, arginfo_mysqli_begin_transaction)
  334. PHP_FE(mysqli_change_user, arginfo_mysqli_change_user)
  335. PHP_FE(mysqli_character_set_name, arginfo_mysqli_only_link)
  336. PHP_FE(mysqli_close, arginfo_mysqli_only_link)
  337. PHP_FE(mysqli_commit, arginfo_mysqli_commit)
  338. PHP_FE(mysqli_connect, arginfo_mysqli_connect)
  339. PHP_FE(mysqli_connect_errno, arginfo_mysqli_no_params)
  340. PHP_FE(mysqli_connect_error, arginfo_mysqli_no_params)
  341. PHP_FE(mysqli_data_seek, arginfo_mysqli_data_seek)
  342. PHP_FE(mysqli_dump_debug_info, arginfo_mysqli_only_link)
  343. PHP_FE(mysqli_debug, arginfo_mysqli_debug)
  344. #if defined(HAVE_EMBEDDED_MYSQLI)
  345. PHP_FE(mysqli_embedded_server_end, NULL)
  346. PHP_FE(mysqli_embedded_server_start, NULL)
  347. #endif
  348. PHP_FE(mysqli_errno, arginfo_mysqli_only_link)
  349. PHP_FE(mysqli_error, arginfo_mysqli_only_link)
  350. PHP_FE(mysqli_error_list, arginfo_mysqli_only_link)
  351. PHP_FE(mysqli_stmt_execute, arginfo_mysqli_only_statement)
  352. PHP_FALIAS(mysqli_execute, mysqli_stmt_execute, arginfo_mysqli_only_statement)
  353. PHP_FE(mysqli_fetch_field, arginfo_mysqli_only_result)
  354. PHP_FE(mysqli_fetch_fields, arginfo_mysqli_only_result)
  355. PHP_FE(mysqli_fetch_field_direct, arginfo_mysqli_result_and_fieldnr)
  356. PHP_FE(mysqli_fetch_lengths, arginfo_mysqli_only_result)
  357. #ifdef MYSQLI_USE_MYSQLND
  358. PHP_FE(mysqli_fetch_all, arginfo_mysqli_fetch_array)
  359. #endif
  360. PHP_FE(mysqli_fetch_array, arginfo_mysqli_fetch_array)
  361. PHP_FE(mysqli_fetch_assoc, arginfo_mysqli_only_result)
  362. PHP_FE(mysqli_fetch_object, arginfo_mysqli_fetch_object)
  363. PHP_FE(mysqli_fetch_row, arginfo_mysqli_only_result)
  364. PHP_FE(mysqli_field_count, arginfo_mysqli_only_link)
  365. PHP_FE(mysqli_field_seek, arginfo_mysqli_result_and_fieldnr)
  366. PHP_FE(mysqli_field_tell, arginfo_mysqli_only_result)
  367. PHP_FE(mysqli_free_result, arginfo_mysqli_only_result)
  368. #if defined(MYSQLI_USE_MYSQLND)
  369. PHP_FE(mysqli_get_connection_stats, arginfo_mysqli_only_link)
  370. PHP_FE(mysqli_get_client_stats, arginfo_mysqli_no_params)
  371. #endif
  372. #ifdef HAVE_MYSQLI_GET_CHARSET
  373. PHP_FE(mysqli_get_charset, arginfo_mysqli_only_link)
  374. #endif
  375. PHP_FE(mysqli_get_client_info, arginfo_mysqli_no_options)
  376. PHP_FE(mysqli_get_client_version, arginfo_mysqli_only_link)
  377. PHP_FE(mysqli_get_links_stats, arginfo_mysqli_no_options)
  378. PHP_FE(mysqli_get_host_info, arginfo_mysqli_only_link)
  379. PHP_FE(mysqli_get_proto_info, arginfo_mysqli_only_link)
  380. PHP_FE(mysqli_get_server_info, arginfo_mysqli_only_link)
  381. PHP_FE(mysqli_get_server_version, arginfo_mysqli_only_link)
  382. PHP_FE(mysqli_get_warnings, arginfo_mysqli_only_link)
  383. PHP_FE(mysqli_init, arginfo_mysqli_no_params)
  384. PHP_FE(mysqli_info, arginfo_mysqli_only_link)
  385. PHP_FE(mysqli_insert_id, arginfo_mysqli_only_link)
  386. PHP_FE(mysqli_kill, arginfo_mysqli_kill)
  387. PHP_FE(mysqli_more_results, arginfo_mysqli_only_link)
  388. PHP_FE(mysqli_multi_query, arginfo_mysqli_multi_query)
  389. PHP_FE(mysqli_next_result, arginfo_mysqli_only_link)
  390. PHP_FE(mysqli_num_fields, arginfo_mysqli_only_result)
  391. PHP_FE(mysqli_num_rows, arginfo_mysqli_only_result)
  392. PHP_FE(mysqli_options, arginfo_mysqli_options)
  393. PHP_FE(mysqli_ping, arginfo_mysqli_only_link)
  394. #if defined(MYSQLI_USE_MYSQLND)
  395. PHP_FE(mysqli_poll, arginfo_mysqli_poll)
  396. #endif
  397. PHP_FE(mysqli_prepare, arginfo_mysqli_prepare)
  398. PHP_FE(mysqli_report, arginfo_mysqli_report)
  399. PHP_FE(mysqli_query, arginfo_mysqli_query)
  400. PHP_FE(mysqli_real_connect, arginfo_mysqli_real_connect)
  401. PHP_FE(mysqli_real_escape_string, arginfo_mysqli_real_escape_string)
  402. PHP_FE(mysqli_real_query, arginfo_mysqli_real_query)
  403. #if defined(MYSQLI_USE_MYSQLND)
  404. PHP_FE(mysqli_reap_async_query, arginfo_mysqli_only_link)
  405. #endif
  406. PHP_FE(mysqli_release_savepoint, arginfo_mysqli_release_savepoint)
  407. PHP_FE(mysqli_rollback, arginfo_mysqli_rollback)
  408. PHP_FE(mysqli_savepoint, arginfo_mysqli_savepoint)
  409. PHP_FE(mysqli_select_db, arginfo_mysqli_select_db)
  410. #ifdef HAVE_MYSQLI_SET_CHARSET
  411. PHP_FE(mysqli_set_charset, arginfo_mysqli_set_charset)
  412. #endif
  413. PHP_FE(mysqli_stmt_affected_rows, arginfo_mysqli_only_statement)
  414. PHP_FE(mysqli_stmt_attr_get, arginfo_mysqli_stmt_attr_get)
  415. PHP_FE(mysqli_stmt_attr_set, arginfo_mysqli_stmt_attr_set)
  416. PHP_FE(mysqli_stmt_bind_param, arginfo_mysqli_stmt_bind_param)
  417. PHP_FE(mysqli_stmt_bind_result, arginfo_mysqli_stmt_bind_result)
  418. PHP_FE(mysqli_stmt_close, arginfo_mysqli_only_statement)
  419. PHP_FE(mysqli_stmt_data_seek, arginfo_mysqli_stmt_data_seek)
  420. PHP_FE(mysqli_stmt_errno, arginfo_mysqli_only_statement)
  421. PHP_FE(mysqli_stmt_error, arginfo_mysqli_only_statement)
  422. PHP_FE(mysqli_stmt_error_list, arginfo_mysqli_only_statement)
  423. PHP_FE(mysqli_stmt_fetch, arginfo_mysqli_only_statement)
  424. PHP_FE(mysqli_stmt_field_count, arginfo_mysqli_only_statement)
  425. PHP_FE(mysqli_stmt_free_result, arginfo_mysqli_only_statement)
  426. #if defined(MYSQLI_USE_MYSQLND)
  427. PHP_FE(mysqli_stmt_get_result, arginfo_mysqli_only_statement)
  428. #endif
  429. PHP_FE(mysqli_stmt_get_warnings, arginfo_mysqli_only_statement)
  430. PHP_FE(mysqli_stmt_init, arginfo_mysqli_only_link)
  431. PHP_FE(mysqli_stmt_insert_id, arginfo_mysqli_only_statement)
  432. #if defined(MYSQLI_USE_MYSQLND)
  433. PHP_FE(mysqli_stmt_more_results, arginfo_mysqli_only_statement)
  434. PHP_FE(mysqli_stmt_next_result, arginfo_mysqli_only_statement)
  435. #endif
  436. PHP_FE(mysqli_stmt_num_rows, arginfo_mysqli_only_statement)
  437. PHP_FE(mysqli_stmt_param_count, arginfo_mysqli_only_statement)
  438. PHP_FE(mysqli_stmt_prepare, arginfo_mysqli_stmt_prepare)
  439. PHP_FE(mysqli_stmt_reset, arginfo_mysqli_only_statement)
  440. PHP_FE(mysqli_stmt_result_metadata, arginfo_mysqli_only_statement)
  441. PHP_FE(mysqli_stmt_send_long_data, arginfo_mysqli_stmt_send_long_data)
  442. PHP_FE(mysqli_stmt_store_result, arginfo_mysqli_only_statement)
  443. PHP_FE(mysqli_stmt_sqlstate, arginfo_mysqli_only_statement)
  444. PHP_FE(mysqli_sqlstate, arginfo_mysqli_only_link)
  445. PHP_FE(mysqli_ssl_set, arginfo_mysqli_ssl_set)
  446. PHP_FE(mysqli_stat, arginfo_mysqli_only_link)
  447. PHP_FE(mysqli_store_result, arginfo_mysqli_store_result)
  448. PHP_FE(mysqli_thread_id, arginfo_mysqli_only_link)
  449. PHP_FE(mysqli_thread_safe, arginfo_mysqli_no_params)
  450. PHP_FE(mysqli_use_result, arginfo_mysqli_only_link)
  451. PHP_FE(mysqli_warning_count, arginfo_mysqli_only_link)
  452. PHP_FE(mysqli_refresh, arginfo_mysqli_refresh)
  453. /* Aliases */
  454. PHP_FALIAS(mysqli_escape_string, mysqli_real_escape_string, arginfo_mysqli_query)
  455. PHP_FALIAS(mysqli_set_opt, mysqli_options, NULL)
  456. PHP_FE_END
  457. };
  458. /* }}} */
  459. /* {{{ mysqli_link_methods[]
  460. *
  461. * Every user visible function must have an entry in mysqli_functions[].
  462. */
  463. const zend_function_entry mysqli_link_methods[] = {
  464. PHP_FALIAS(autocommit, mysqli_autocommit, arginfo_class_mysqli_autocommit)
  465. PHP_FALIAS(begin_transaction, mysqli_begin_transaction, arginfo_class_mysqli_begin_transaction)
  466. PHP_FALIAS(change_user,mysqli_change_user, arginfo_class_mysqli_change_user)
  467. PHP_FALIAS(character_set_name, mysqli_character_set_name, arginfo_mysqli_no_params)
  468. PHP_FALIAS(close, mysqli_close, arginfo_mysqli_no_params)
  469. PHP_FALIAS(commit, mysqli_commit, arginfo_class_mysqli_commit)
  470. PHP_FALIAS(connect, mysqli_connect, arginfo_mysqli_connect)
  471. PHP_FALIAS(dump_debug_info, mysqli_dump_debug_info, arginfo_mysqli_no_params)
  472. PHP_FALIAS(debug, mysqli_debug, arginfo_mysqli_debug)
  473. #ifdef HAVE_MYSQLI_GET_CHARSET
  474. PHP_FALIAS(get_charset, mysqli_get_charset, arginfo_mysqli_no_params)
  475. #endif
  476. PHP_FALIAS(get_client_info, mysqli_get_client_info, arginfo_mysqli_no_params)
  477. #if defined(MYSQLI_USE_MYSQLND)
  478. PHP_FALIAS(get_connection_stats, mysqli_get_connection_stats, arginfo_mysqli_no_params)
  479. #endif
  480. PHP_FALIAS(get_server_info, mysqli_get_server_info, arginfo_mysqli_no_params)
  481. PHP_FALIAS(get_warnings, mysqli_get_warnings, arginfo_mysqli_no_params)
  482. PHP_FALIAS(init,mysqli_init_method, arginfo_mysqli_no_params)
  483. PHP_FALIAS(kill,mysqli_kill, arginfo_class_mysqli_kill)
  484. PHP_FALIAS(multi_query, mysqli_multi_query, arginfo_class_mysqli_multi_query)
  485. PHP_FALIAS(__construct, mysqli_link_construct, arginfo_mysqli_connect)
  486. PHP_FALIAS(more_results, mysqli_more_results, arginfo_mysqli_no_params)
  487. PHP_FALIAS(next_result, mysqli_next_result, arginfo_mysqli_no_params)
  488. PHP_FALIAS(options, mysqli_options, arginfo_class_mysqli_options)
  489. PHP_FALIAS(ping, mysqli_ping, arginfo_mysqli_no_params)
  490. #if defined(MYSQLI_USE_MYSQLND)
  491. ZEND_FENTRY(poll, ZEND_FN(mysqli_poll), arginfo_mysqli_poll, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
  492. #endif
  493. PHP_FALIAS(prepare, mysqli_prepare, arginfo_class_mysqli_prepare)
  494. PHP_FALIAS(query, mysqli_query, arginfo_class_mysqli_query)
  495. PHP_FALIAS(real_connect, mysqli_real_connect, arginfo_class_mysqli_real_connect)
  496. PHP_FALIAS(real_escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string)
  497. #if defined(MYSQLI_USE_MYSQLND)
  498. PHP_FALIAS(reap_async_query, mysqli_reap_async_query, arginfo_mysqli_no_params)
  499. #endif
  500. PHP_FALIAS(escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string)
  501. PHP_FALIAS(real_query, mysqli_real_query, arginfo_class_mysqli_real_query)
  502. PHP_FALIAS(release_savepoint, mysqli_release_savepoint, arginfo_class_mysqli_release_savepoint)
  503. PHP_FALIAS(rollback, mysqli_rollback, arginfo_class_mysqli_rollback)
  504. PHP_FALIAS(savepoint, mysqli_savepoint, arginfo_class_mysqli_savepoint)
  505. PHP_FALIAS(select_db,mysqli_select_db, arginfo_class_mysqli_select_db)
  506. #ifdef HAVE_MYSQLI_SET_CHARSET
  507. PHP_FALIAS(set_charset, mysqli_set_charset, arginfo_class_mysqli_set_charset)
  508. #endif
  509. PHP_FALIAS(set_opt, mysqli_options, arginfo_class_mysqli_options)
  510. PHP_FALIAS(ssl_set, mysqli_ssl_set, arginfo_class_mysqli_ssl_set)
  511. PHP_FALIAS(stat, mysqli_stat, arginfo_mysqli_no_params)
  512. PHP_FALIAS(stmt_init, mysqli_stmt_init, arginfo_mysqli_no_params)
  513. PHP_FALIAS(store_result, mysqli_store_result, arginfo_class_store_result)
  514. PHP_FALIAS(thread_safe, mysqli_thread_safe, arginfo_mysqli_no_params)
  515. PHP_FALIAS(use_result, mysqli_use_result, arginfo_mysqli_no_params)
  516. PHP_FALIAS(refresh,mysqli_refresh, arginfo_class_mysqli_refresh)
  517. PHP_FE_END
  518. };
  519. /* }}} */
  520. /* {{{ mysqli_result_methods[]
  521. *
  522. * Every user visible function must have an entry in mysqli_result_functions[].
  523. */
  524. const zend_function_entry mysqli_result_methods[] = {
  525. PHP_FALIAS(__construct, mysqli_result_construct, NULL)
  526. PHP_FALIAS(close, mysqli_free_result, arginfo_mysqli_no_params)
  527. PHP_FALIAS(free, mysqli_free_result, arginfo_mysqli_no_params)
  528. PHP_FALIAS(data_seek, mysqli_data_seek, arginfo_class_mysqli_data_seek)
  529. PHP_FALIAS(fetch_field, mysqli_fetch_field, arginfo_mysqli_no_params)
  530. PHP_FALIAS(fetch_fields, mysqli_fetch_fields, arginfo_mysqli_no_params)
  531. PHP_FALIAS(fetch_field_direct, mysqli_fetch_field_direct, arginfo_class_mysqli_result_and_fieldnr)
  532. #if defined(MYSQLI_USE_MYSQLND)
  533. PHP_FALIAS(fetch_all, mysqli_fetch_all, arginfo_class_mysqli_fetch_array)
  534. #endif
  535. PHP_FALIAS(fetch_array, mysqli_fetch_array, arginfo_class_mysqli_fetch_array)
  536. PHP_FALIAS(fetch_assoc, mysqli_fetch_assoc, arginfo_mysqli_no_params)
  537. PHP_FALIAS(fetch_object,mysqli_fetch_object, arginfo_class_mysqli_fetch_object)
  538. PHP_FALIAS(fetch_row, mysqli_fetch_row, arginfo_mysqli_no_params)
  539. PHP_FALIAS(field_seek, mysqli_field_seek, arginfo_class_mysqli_result_and_fieldnr)
  540. PHP_FALIAS(free_result, mysqli_free_result, arginfo_mysqli_no_params)
  541. PHP_FE_END
  542. };
  543. /* }}} */
  544. /* {{{ mysqli_stmt_methods[]
  545. *
  546. * Every user visible function must have an entry in mysqli_stmt_functions[].
  547. */
  548. const zend_function_entry mysqli_stmt_methods[] = {
  549. PHP_FALIAS(__construct, mysqli_stmt_construct, NULL)
  550. PHP_FALIAS(attr_get, mysqli_stmt_attr_get, arginfo_class_mysqli_stmt_attr_get)
  551. PHP_FALIAS(attr_set,mysqli_stmt_attr_set, arginfo_class_mysqli_stmt_attr_set)
  552. PHP_FALIAS(bind_param,mysqli_stmt_bind_param, arginfo_class_mysqli_stmt_bind_param)
  553. PHP_FALIAS(bind_result,mysqli_stmt_bind_result, arginfo_class_mysqli_stmt_bind_result)
  554. PHP_FALIAS(close, mysqli_stmt_close, arginfo_mysqli_no_params)
  555. PHP_FALIAS(data_seek, mysqli_stmt_data_seek, arginfo_class_mysqli_data_seek)
  556. PHP_FALIAS(execute, mysqli_stmt_execute, arginfo_mysqli_no_params)
  557. PHP_FALIAS(fetch, mysqli_stmt_fetch, arginfo_mysqli_no_params)
  558. PHP_FALIAS(get_warnings, mysqli_stmt_get_warnings, arginfo_mysqli_no_params)
  559. PHP_FALIAS(result_metadata, mysqli_stmt_result_metadata, arginfo_mysqli_no_params)
  560. #if defined(MYSQLI_USE_MYSQLND)
  561. PHP_FALIAS(more_results, mysqli_stmt_more_results, arginfo_mysqli_no_params)
  562. PHP_FALIAS(next_result, mysqli_stmt_next_result, arginfo_mysqli_no_params)
  563. #endif
  564. PHP_FALIAS(num_rows, mysqli_stmt_num_rows, arginfo_mysqli_no_params)
  565. PHP_FALIAS(send_long_data, mysqli_stmt_send_long_data, arginfo_class_mysqli_stmt_send_long_data)
  566. PHP_FALIAS(free_result, mysqli_stmt_free_result, arginfo_mysqli_no_params)
  567. PHP_FALIAS(reset, mysqli_stmt_reset, arginfo_mysqli_no_params)
  568. PHP_FALIAS(prepare, mysqli_stmt_prepare, arginfo_class_mysqli_prepare)
  569. PHP_FALIAS(store_result, mysqli_stmt_store_result, arginfo_mysqli_no_params)
  570. #if defined(MYSQLI_USE_MYSQLND)
  571. PHP_FALIAS(get_result, mysqli_stmt_get_result, arginfo_mysqli_no_params)
  572. #endif
  573. PHP_FE_END
  574. };
  575. /* }}} */
  576. /*
  577. * Local variables:
  578. * tab-width: 4
  579. * c-basic-offset: 4
  580. * End:
  581. * vim600: noet sw=4 ts=4 fdm=marker
  582. * vim<600: noet sw=4 ts=4
  583. */