mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
fixed mysqli_prepare_result
This commit is contained in:
parent
130860e709
commit
05e02eb27b
1 changed files with 9 additions and 5 deletions
|
@ -1342,10 +1342,11 @@ PHP_FUNCTION(mysqli_prepare)
|
||||||
*/
|
*/
|
||||||
PHP_FUNCTION(mysqli_prepare_result)
|
PHP_FUNCTION(mysqli_prepare_result)
|
||||||
{
|
{
|
||||||
STMT *stmt;
|
STMT *stmt;
|
||||||
MYSQL_RES *result;
|
MYSQL_RES *result;
|
||||||
zval *mysql_stmt;
|
zval *mysql_stmt;
|
||||||
PR_STMT *prstmt;
|
PR_STMT *prstmt = NULL;
|
||||||
|
MYSQLI_RESOURCE *mysqli_resource;
|
||||||
|
|
||||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) {
|
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
|
@ -1356,7 +1357,10 @@ PHP_FUNCTION(mysqli_prepare_result)
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
MYSQLI_RETURN_RESOURCE(result, mysqli_result_class_entry);
|
mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE));
|
||||||
|
mysqli_resource->ptr = (void *)result;
|
||||||
|
mysqli_resource->prinfo = (void *)prstmt;
|
||||||
|
MYSQLI_RETURN_RESOURCE(mysqli_resource, mysqli_result_class_entry);
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue