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