From: Georg Richter Date: Tue, 18 Feb 2003 08:49:00 +0000 (+0000) Subject: added new function mysqli_stmt_store_result X-Git-Tag: RELEASE_0_5~912 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=500dfcfd62d04937ce73e46c0fb9b5e82da84105;p=php added new function mysqli_stmt_store_result --- diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 4cbf1138e7..2f2088454d 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -1630,8 +1630,27 @@ PHP_FUNCTION(mysqli_stmt_error) } /* }}} */ +/* {{{ bool resource mysqli_stmt_store_result(stmt) +*/ +PHP_FUNCTION(mysqli_stmt_store_result) +{ + STMT *stmt; + zval *mysql_stmt; + + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { + return; + } + MYSQLI_FETCH_RESOURCE(stmt, STMT *, &mysql_stmt, "mysqli_stmt"); + + if (mysql_stmt_store_result(stmt->stmt)){ + RETURN_FALSE; + } + RETURN_TRUE; +} +/* }}} */ /* {{{ proto int mysqli_thread_id(resource link) */ + PHP_FUNCTION(mysqli_thread_id) { MYSQL *mysql; diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c index 9bb7665abb..b7e00e0b80 100644 --- a/ext/mysqli/mysqli_fe.c +++ b/ext/mysqli/mysqli_fe.c @@ -110,6 +110,7 @@ function_entry mysqli_functions[] = { PHP_FE(mysqli_stmt_errno, NULL) PHP_FE(mysqli_stmt_error, NULL) PHP_FE(mysqli_store_result, NULL) + PHP_FE(mysqli_stmt_store_result, NULL) PHP_FE(mysqli_thread_id, NULL) PHP_FE(mysqli_thread_safe, NULL) PHP_FE(mysqli_use_result, NULL) @@ -207,13 +208,14 @@ function_entry mysqli_result_methods[] = { * Every user visible function must have an entry in mysqli_stmt_functions[]. */ function_entry mysqli_stmt_methods[] = { + PHP_FALIAS(affected_rows,mysqli_stmt_affected_rows,NULL) PHP_FALIAS(bind_param,mysqli_bind_param,NULL) PHP_FALIAS(bind_result,mysqli_bind_result,NULL) PHP_FALIAS(execute,mysqli_execute,NULL) PHP_FALIAS(fetch,mysqli_fetch,NULL) PHP_FALIAS(param_count,mysqli_param_count,NULL) PHP_FALIAS(send_long_data,mysqli_send_long_data,NULL) - PHP_FALIAS(affected_rows,mysqli_stmt_affected_rows,NULL) + PHP_FALIAS(store_result,mysqli_stmt_store_result,NULL) PHP_FALIAS(close,mysqli_stmt_close,NULL) PHP_FALIAS(errno,mysqli_stmt_errno,NULL) PHP_FALIAS(error,mysqli_stmt_error,NULL) diff --git a/ext/mysqli/php_mysqli.h b/ext/mysqli/php_mysqli.h index 38546ede26..fb34f8f5fd 100644 --- a/ext/mysqli/php_mysqli.h +++ b/ext/mysqli/php_mysqli.h @@ -231,6 +231,7 @@ PHP_FUNCTION(mysqli_stmt_affected_rows); PHP_FUNCTION(mysqli_stmt_close); PHP_FUNCTION(mysqli_stmt_errno); PHP_FUNCTION(mysqli_stmt_error); +PHP_FUNCTION(mysqli_stmt_store_result); PHP_FUNCTION(mysqli_store_result); PHP_FUNCTION(mysqli_thread_id); PHP_FUNCTION(mysqli_thread_safe);