]> granicus.if.org Git - php/commitdiff
added new function mysqli_stmt_store_result
authorGeorg Richter <georg@php.net>
Tue, 18 Feb 2003 08:49:00 +0000 (08:49 +0000)
committerGeorg Richter <georg@php.net>
Tue, 18 Feb 2003 08:49:00 +0000 (08:49 +0000)
ext/mysqli/mysqli_api.c
ext/mysqli/mysqli_fe.c
ext/mysqli/php_mysqli.h

index 4cbf1138e73cec98434039865dd337002719af5a..2f2088454d665e8cbc23b0a4e026472d3871224c 100644 (file)
@@ -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;
index 9bb7665abb1594979d4adce22b2a32b8371babe4..b7e00e0b80229a3a75a7b760f5740688ffb11d99 100644 (file)
@@ -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)
index 38546ede268f14062a7b0bc4bdeb2dfb02d1c6ef..fb34f8f5fd3fea9675e008ee1939a65867ead445 100644 (file)
@@ -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);