1 /* 2 +----------------------------------------------------------------------+ 3 | PHP Version 5 | 4 +----------------------------------------------------------------------+ 5 | Copyright (c) 1997-2013 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 #if PHP_VERSION_ID >= 50399 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_stmt_execute, arginfo_mysqli_only_statement) 356 PHP_FALIAS(mysqli_execute, mysqli_stmt_execute, arginfo_mysqli_only_statement) 357 PHP_FE(mysqli_fetch_field, arginfo_mysqli_only_result) 358 PHP_FE(mysqli_fetch_fields, arginfo_mysqli_only_result) 359 PHP_FE(mysqli_fetch_field_direct, arginfo_mysqli_result_and_fieldnr) 360 PHP_FE(mysqli_fetch_lengths, arginfo_mysqli_only_result) 361 #ifdef MYSQLI_USE_MYSQLND 362 PHP_FE(mysqli_fetch_all, arginfo_mysqli_only_result) 363 #endif 364 PHP_FE(mysqli_fetch_array, arginfo_mysqli_fetch_array) 365 PHP_FE(mysqli_fetch_assoc, arginfo_mysqli_only_result) 366 PHP_FE(mysqli_fetch_object, arginfo_mysqli_fetch_object) 367 PHP_FE(mysqli_fetch_row, arginfo_mysqli_only_result) 368 PHP_FE(mysqli_field_count, arginfo_mysqli_only_link) 369 PHP_FE(mysqli_field_seek, arginfo_mysqli_result_and_fieldnr) 370 PHP_FE(mysqli_field_tell, arginfo_mysqli_only_result) 371 PHP_FE(mysqli_free_result, arginfo_mysqli_only_result) 372 #if defined(MYSQLI_USE_MYSQLND) 373 PHP_FE(mysqli_get_cache_stats, arginfo_mysqli_no_params) 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_fetch, arginfo_mysqli_only_statement) 429 PHP_FE(mysqli_stmt_field_count, arginfo_mysqli_only_statement) 430 PHP_FE(mysqli_stmt_free_result, arginfo_mysqli_only_statement) 431 #if defined(MYSQLI_USE_MYSQLND) 432 PHP_FE(mysqli_stmt_get_result, arginfo_mysqli_only_statement) 433 #endif 434 PHP_FE(mysqli_stmt_get_warnings, arginfo_mysqli_only_statement) 435 PHP_FE(mysqli_stmt_init, arginfo_mysqli_only_link) 436 PHP_FE(mysqli_stmt_insert_id, arginfo_mysqli_only_statement) 437 #if defined(MYSQLI_USE_MYSQLND) 438 PHP_FE(mysqli_stmt_more_results, arginfo_mysqli_only_statement) 439 PHP_FE(mysqli_stmt_next_result, arginfo_mysqli_only_statement) 440 #endif 441 PHP_FE(mysqli_stmt_num_rows, arginfo_mysqli_only_statement) 442 PHP_FE(mysqli_stmt_param_count, arginfo_mysqli_only_statement) 443 PHP_FE(mysqli_stmt_prepare, arginfo_mysqli_stmt_prepare) 444 PHP_FE(mysqli_stmt_reset, arginfo_mysqli_only_statement) 445 PHP_FE(mysqli_stmt_result_metadata, arginfo_mysqli_only_statement) 446 PHP_FE(mysqli_stmt_send_long_data, arginfo_mysqli_stmt_send_long_data) 447 PHP_FE(mysqli_stmt_store_result, arginfo_mysqli_only_statement) 448 PHP_FE(mysqli_stmt_sqlstate, arginfo_mysqli_only_statement) 449 PHP_FE(mysqli_sqlstate, arginfo_mysqli_only_link) 450 PHP_FE(mysqli_ssl_set, arginfo_mysqli_ssl_set) 451 PHP_FE(mysqli_stat, arginfo_mysqli_only_link) 452 PHP_FE(mysqli_store_result, arginfo_mysqli_only_link) 453 PHP_FE(mysqli_thread_id, arginfo_mysqli_only_link) 454 PHP_FE(mysqli_thread_safe, arginfo_mysqli_no_params) 455 PHP_FE(mysqli_use_result, arginfo_mysqli_only_link) 456 PHP_FE(mysqli_warning_count, arginfo_mysqli_only_link) 457 458 PHP_FE(mysqli_refresh, arginfo_mysqli_refresh) 459 460 /* Aliases */ 461 PHP_FALIAS(mysqli_bind_param, mysqli_stmt_bind_param, arginfo_mysqli_stmt_bind_param) 462 PHP_FALIAS(mysqli_bind_result, mysqli_stmt_bind_result, arginfo_mysqli_stmt_bind_result) 463 PHP_FALIAS(mysqli_client_encoding, mysqli_character_set_name, NULL) 464 PHP_FALIAS(mysqli_escape_string, mysqli_real_escape_string, arginfo_mysqli_query) 465 PHP_FALIAS(mysqli_fetch, mysqli_stmt_fetch, NULL) 466 PHP_FALIAS(mysqli_param_count, mysqli_stmt_param_count, NULL) 467 PHP_FALIAS(mysqli_get_metadata, mysqli_stmt_result_metadata,NULL) 468 PHP_FALIAS(mysqli_send_long_data, mysqli_stmt_send_long_data, NULL) 469 PHP_FALIAS(mysqli_set_opt, mysqli_options, NULL) 470 471 PHP_FE_END 472 }; 473 /* }}} */ 474 475 /* {{{ mysqli_link_methods[] 476 * 477 * Every user visible function must have an entry in mysqli_functions[]. 478 */ 479 const zend_function_entry mysqli_link_methods[] = { 480 PHP_FALIAS(autocommit, mysqli_autocommit, arginfo_class_mysqli_autocommit) 481 PHP_FALIAS(change_user,mysqli_change_user, arginfo_class_mysqli_change_user) 482 PHP_FALIAS(character_set_name, mysqli_character_set_name, arginfo_mysqli_no_params) 483 PHP_FALIAS(client_encoding, mysqli_character_set_name, arginfo_mysqli_no_params) /* deprecated */ 484 PHP_FALIAS(close, mysqli_close, arginfo_mysqli_no_params) 485 PHP_FALIAS(commit, mysqli_commit, arginfo_mysqli_no_params) 486 PHP_FALIAS(connect, mysqli_connect, arginfo_mysqli_connect) 487 PHP_FALIAS(dump_debug_info, mysqli_dump_debug_info, arginfo_mysqli_no_params) 488 PHP_FALIAS(debug, mysqli_debug, arginfo_mysqli_debug) 489 #ifdef HAVE_MYSQLI_GET_CHARSET 490 PHP_FALIAS(get_charset, mysqli_get_charset, arginfo_mysqli_no_params) 491 #endif 492 PHP_FALIAS(get_client_info, mysqli_get_client_info, arginfo_mysqli_no_params) 493 #if defined(MYSQLI_USE_MYSQLND) 494 PHP_FALIAS(get_connection_stats, mysqli_get_connection_stats, arginfo_mysqli_no_params) 495 #endif 496 PHP_FALIAS(get_server_info, mysqli_get_server_info, arginfo_mysqli_no_params) 497 PHP_FALIAS(get_warnings, mysqli_get_warnings, arginfo_mysqli_no_params) 498 PHP_FALIAS(init,mysqli_init, arginfo_mysqli_no_params) 499 PHP_FALIAS(kill,mysqli_kill, arginfo_class_mysqli_kill) 500 #if !defined(MYSQLI_USE_MYSQLND) 501 PHP_FALIAS(set_local_infile_default, mysqli_set_local_infile_default, arginfo_mysqli_no_params) 502 PHP_FALIAS(set_local_infile_handler, mysqli_set_local_infile_handler, arginfo_class_mysqli_set_local_infile_handler) 503 #endif 504 PHP_FALIAS(multi_query, mysqli_multi_query, arginfo_class_mysqli_query) 505 PHP_FALIAS(mysqli, mysqli_link_construct, arginfo_mysqli_connect) 506 PHP_FALIAS(more_results, mysqli_more_results, arginfo_mysqli_no_params) 507 PHP_FALIAS(next_result, mysqli_next_result, arginfo_mysqli_no_params) 508 PHP_FALIAS(options, mysqli_options, arginfo_class_mysqli_options) 509 PHP_FALIAS(ping, mysqli_ping, arginfo_mysqli_no_params) 510 #if defined(MYSQLI_USE_MYSQLND) 511 ZEND_FENTRY(poll, ZEND_FN(mysqli_poll), arginfo_mysqli_poll, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) 512 #endif 513 PHP_FALIAS(prepare, mysqli_prepare, arginfo_class_mysqli_query) 514 PHP_FALIAS(query, mysqli_query, arginfo_class_mysqli_query) 515 PHP_FALIAS(real_connect, mysqli_real_connect, arginfo_class_mysqli_real_connect) 516 PHP_FALIAS(real_escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string) 517 #if defined(MYSQLI_USE_MYSQLND) 518 PHP_FALIAS(reap_async_query, mysqli_reap_async_query, arginfo_mysqli_no_params) 519 #endif 520 PHP_FALIAS(escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string) 521 PHP_FALIAS(real_query, mysqli_real_query, arginfo_class_mysqli_query) 522 PHP_FALIAS(rollback,mysqli_rollback, arginfo_mysqli_no_params) 523 PHP_FALIAS(select_db,mysqli_select_db, arginfo_class_mysqli_select_db) 524 #ifdef HAVE_MYSQLI_SET_CHARSET 525 PHP_FALIAS(set_charset, mysqli_set_charset, arginfo_class_mysqli_set_charset) 526 #endif 527 PHP_FALIAS(set_opt, mysqli_options, arginfo_class_mysqli_options) 528 PHP_FALIAS(ssl_set, mysqli_ssl_set, arginfo_class_mysqli_ssl_set) 529 PHP_FALIAS(stat, mysqli_stat, arginfo_mysqli_no_params) 530 PHP_FALIAS(stmt_init, mysqli_stmt_init, arginfo_mysqli_no_params) 531 PHP_FALIAS(store_result, mysqli_store_result, arginfo_mysqli_no_params) 532 PHP_FALIAS(thread_safe, mysqli_thread_safe, arginfo_mysqli_no_params) 533 PHP_FALIAS(use_result, mysqli_use_result, arginfo_mysqli_no_params) 534 PHP_FALIAS(refresh,mysqli_refresh, arginfo_class_mysqli_refresh) 535 {NULL, NULL, NULL} 536 }; 537 /* }}} */ 538 539 /* {{{ mysqli_result_methods[] 540 * 541 * Every user visible function must have an entry in mysqli_result_functions[]. 542 */ 543 const zend_function_entry mysqli_result_methods[] = { 544 PHP_FALIAS(__construct, mysqli_result_construct, NULL) 545 PHP_FALIAS(close, mysqli_free_result, arginfo_mysqli_no_params) 546 PHP_FALIAS(free, mysqli_free_result, arginfo_mysqli_no_params) 547 PHP_FALIAS(data_seek, mysqli_data_seek, arginfo_class_mysqli_data_seek) 548 PHP_FALIAS(fetch_field, mysqli_fetch_field, arginfo_mysqli_no_params) 549 PHP_FALIAS(fetch_fields, mysqli_fetch_fields, arginfo_mysqli_no_params) 550 PHP_FALIAS(fetch_field_direct, mysqli_fetch_field_direct, arginfo_class_mysqli_result_and_fieldnr) 551 #if defined(MYSQLI_USE_MYSQLND) 552 PHP_FALIAS(fetch_all, mysqli_fetch_all, arginfo_mysqli_no_params) 553 #endif 554 PHP_FALIAS(fetch_array, mysqli_fetch_array, arginfo_class_mysqli_fetch_array) 555 PHP_FALIAS(fetch_assoc, mysqli_fetch_assoc, arginfo_mysqli_no_params) 556 PHP_FALIAS(fetch_object,mysqli_fetch_object, arginfo_class_mysqli_fetch_object) 557 PHP_FALIAS(fetch_row, mysqli_fetch_row, arginfo_mysqli_no_params) 558 PHP_FALIAS(field_seek, mysqli_field_seek, arginfo_class_mysqli_result_and_fieldnr) 559 PHP_FALIAS(free_result, mysqli_free_result, arginfo_mysqli_no_params) 560 {NULL, NULL, NULL} 561 }; 562 /* }}} */ 563 564 /* {{{ mysqli_stmt_methods[] 565 * 566 * Every user visible function must have an entry in mysqli_stmt_functions[]. 567 */ 568 const zend_function_entry mysqli_stmt_methods[] = { 569 PHP_FALIAS(__construct, mysqli_stmt_construct, NULL) 570 PHP_FALIAS(attr_get, mysqli_stmt_attr_get, arginfo_class_mysqli_stmt_attr_get) 571 PHP_FALIAS(attr_set,mysqli_stmt_attr_set, arginfo_class_mysqli_stmt_attr_set) 572 PHP_FALIAS(bind_param,mysqli_stmt_bind_param, arginfo_class_mysqli_stmt_bind_param) 573 PHP_FALIAS(bind_result,mysqli_stmt_bind_result, arginfo_class_mysqli_stmt_bind_result) 574 PHP_FALIAS(close, mysqli_stmt_close, arginfo_mysqli_no_params) 575 PHP_FALIAS(data_seek, mysqli_stmt_data_seek, arginfo_class_mysqli_data_seek) 576 PHP_FALIAS(execute, mysqli_stmt_execute, arginfo_mysqli_no_params) 577 PHP_FALIAS(fetch, mysqli_stmt_fetch, arginfo_mysqli_no_params) 578 PHP_FALIAS(get_warnings, mysqli_stmt_get_warnings, arginfo_mysqli_no_params) 579 PHP_FALIAS(result_metadata, mysqli_stmt_result_metadata, arginfo_mysqli_no_params) 580 #if defined(MYSQLI_USE_MYSQLND) 581 PHP_FALIAS(more_results, mysqli_stmt_more_results, arginfo_mysqli_no_params) 582 PHP_FALIAS(next_result, mysqli_stmt_next_result, arginfo_mysqli_no_params) 583 #endif 584 PHP_FALIAS(num_rows, mysqli_stmt_num_rows, arginfo_mysqli_no_params) 585 PHP_FALIAS(send_long_data, mysqli_stmt_send_long_data, arginfo_class_mysqli_stmt_send_long_data) 586 PHP_FALIAS(free_result, mysqli_stmt_free_result, arginfo_mysqli_no_params) 587 PHP_FALIAS(reset, mysqli_stmt_reset, arginfo_mysqli_no_params) 588 PHP_FALIAS(prepare, mysqli_stmt_prepare, arginfo_class_mysqli_query) 589 PHP_FALIAS(store_result, mysqli_stmt_store_result, arginfo_mysqli_no_params) 590 #if defined(MYSQLI_USE_MYSQLND) 591 PHP_FALIAS(get_result, mysqli_stmt_get_result, arginfo_mysqli_no_params) 592 #endif 593 {NULL, NULL, NULL} 594 }; 595 /* }}} */ 596 597 /* 598 * Local variables: 599 * tab-width: 4 600 * c-basic-offset: 4 601 * End: 602 * vim600: noet sw=4 ts=4 fdm=marker 603 * vim<600: noet sw=4 ts=4 604 */ 605