version 1.1.1.2, 2012/05/29 12:34:41
|
version 1.1.1.5, 2014/06/15 20:03:51
|
Line 2
|
Line 2
|
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| PHP Version 5 | |
| PHP Version 5 | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| Copyright (c) 1997-2012 The PHP Group | | | Copyright (c) 1997-2014 The PHP Group | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| This source file is subject to version 3.01 of the PHP license, | |
| This source file is subject to version 3.01 of the PHP license, | |
| that is bundled with this package in the file LICENSE, and is | |
| that is bundled with this package in the file LICENSE, and is | |
Line 162 void php_clear_stmt_bind(MY_STMT *stmt TSRMLS_DC)
|
Line 162 void php_clear_stmt_bind(MY_STMT *stmt TSRMLS_DC)
|
{ |
{ |
if (stmt->stmt) { |
if (stmt->stmt) { |
if (mysqli_stmt_close(stmt->stmt, TRUE)) { |
if (mysqli_stmt_close(stmt->stmt, TRUE)) { |
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error occured while closing statement"); | php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error occurred while closing statement"); |
return; |
return; |
} |
} |
} |
} |
Line 176 void php_clear_stmt_bind(MY_STMT *stmt TSRMLS_DC)
|
Line 176 void php_clear_stmt_bind(MY_STMT *stmt TSRMLS_DC)
|
php_free_stmt_bind_buffer(stmt->param, FETCH_SIMPLE); |
php_free_stmt_bind_buffer(stmt->param, FETCH_SIMPLE); |
/* Clean output bind */ |
/* Clean output bind */ |
php_free_stmt_bind_buffer(stmt->result, FETCH_RESULT); |
php_free_stmt_bind_buffer(stmt->result, FETCH_RESULT); |
#endif |
|
|
|
|
if (stmt->link_handle) { |
|
zend_objects_store_del_ref_by_handle(stmt->link_handle TSRMLS_CC); |
|
} |
|
#endif |
if (stmt->query) { |
if (stmt->query) { |
efree(stmt->query); |
efree(stmt->query); |
} |
} |
Line 531 PHP_MYSQLI_EXPORT(zend_object_value) mysqli_objects_ne
|
Line 534 PHP_MYSQLI_EXPORT(zend_object_value) mysqli_objects_ne
|
#include "ext/mysqlnd/mysqlnd_reverse_api.h" |
#include "ext/mysqlnd/mysqlnd_reverse_api.h" |
static MYSQLND *mysqli_convert_zv_to_mysqlnd(zval * zv TSRMLS_DC) |
static MYSQLND *mysqli_convert_zv_to_mysqlnd(zval * zv TSRMLS_DC) |
{ |
{ |
if (Z_TYPE_P(zv) == IS_OBJECT && Z_OBJCE_P(zv) == mysqli_link_class_entry) { | if (Z_TYPE_P(zv) == IS_OBJECT && instanceof_function(Z_OBJCE_P(zv), mysqli_link_class_entry TSRMLS_CC)) { |
MY_MYSQL * mysql; |
MY_MYSQL * mysql; |
MYSQLI_RESOURCE * my_res; |
MYSQLI_RESOURCE * my_res; |
mysqli_object * intern = (mysqli_object *)zend_object_store_get_object(zv TSRMLS_CC); |
mysqli_object * intern = (mysqli_object *)zend_object_store_get_object(zv TSRMLS_CC); |
Line 838 PHP_MINIT_FUNCTION(mysqli)
|
Line 841 PHP_MINIT_FUNCTION(mysqli)
|
REGISTER_LONG_CONSTANT("MYSQLI_REFRESH_BACKUP_LOG", REFRESH_BACKUP_LOG, CONST_CS | CONST_PERSISTENT); |
REGISTER_LONG_CONSTANT("MYSQLI_REFRESH_BACKUP_LOG", REFRESH_BACKUP_LOG, CONST_CS | CONST_PERSISTENT); |
#endif |
#endif |
|
|
|
#if MYSQL_VERSION_ID >= 50611 || defined(MYSQLI_USE_MYSQLND) |
|
REGISTER_LONG_CONSTANT("MYSQLI_OPT_CAN_HANDLE_EXPIRED_PASSWORDS", MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS, CONST_CS | CONST_PERSISTENT); |
|
#endif |
|
|
#ifdef MYSQLI_USE_MYSQLND |
#ifdef MYSQLI_USE_MYSQLND |
mysqlnd_reverse_api_register_api(&mysqli_reverse_api TSRMLS_CC); |
mysqlnd_reverse_api_register_api(&mysqli_reverse_api TSRMLS_CC); |
Line 1052 PHP_FUNCTION(mysqli_stmt_construct)
|
Line 1058 PHP_FUNCTION(mysqli_stmt_construct)
|
efree(stmt); |
efree(stmt); |
RETURN_FALSE; |
RETURN_FALSE; |
} |
} |
|
#ifndef MYSQLI_USE_MYSQLND |
|
stmt->link_handle = Z_OBJ_HANDLE(*mysql_link); |
|
zend_objects_store_add_ref_by_handle(stmt->link_handle TSRMLS_CC); |
|
#endif |
|
|
mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE)); |
mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE)); |
mysqli_resource->ptr = (void *)stmt; |
mysqli_resource->ptr = (void *)stmt; |
Line 1254 void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARA
|
Line 1264 void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARA
|
|
|
php_mysqli_fetch_into_hash_aux(return_value, result, fetchtype TSRMLS_CC); |
php_mysqli_fetch_into_hash_aux(return_value, result, fetchtype TSRMLS_CC); |
|
|
if (into_object && Z_TYPE_P(return_value) != IS_NULL) { | if (into_object && Z_TYPE_P(return_value) == IS_ARRAY) { |
zval dataset = *return_value; |
zval dataset = *return_value; |
zend_fcall_info fci; |
zend_fcall_info fci; |
zend_fcall_info_cache fcc; |
zend_fcall_info_cache fcc; |