diff options
| author | Georg Richter <georg@php.net> | 2004-03-10 09:50:05 +0000 |
|---|---|---|
| committer | Georg Richter <georg@php.net> | 2004-03-10 09:50:05 +0000 |
| commit | a3bd712b7805e19446ced7c951959ee0c08c259f (patch) | |
| tree | 194c496c804d56ec0253e4bee0dd1631e13ff53a /ext/mysqli/mysqli_api.c | |
| parent | 25adeaf77c13b7081b7785ee3ada28f5561099dc (diff) | |
| download | php-git-a3bd712b7805e19446ced7c951959ee0c08c259f.tar.gz | |
added new function mysql_stmt_free_result
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
| -rw-r--r-- | ext/mysqli/mysqli_api.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 876b39afc9..6a25920f93 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -1483,6 +1483,27 @@ PHP_FUNCTION(mysqli_stmt_data_seek) } /* }}} */ +#ifndef HAVE_MYSQLI_OLDAPI +/* {{{ proto void mysqli_stmt_free_result(object stmt) + Free stored result memory for the given statement handle */ +PHP_FUNCTION(mysqli_stmt_free_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"); + + mysql_stmt_free_result(stmt->stmt); + + return; +} +/* }}} */ +#endif + /* {{{ proto mixed mysqli_stmt_num_rows(object stmt) Return the number of rows in statements result set */ PHP_FUNCTION(mysqli_stmt_num_rows) |
