sniper Mon Jul 28 06:23:36 2003 EDT Modified files: /php-src/ext/mysqli mysqli_api.c mysqli_nonapi.c Log: ws fix Index: php-src/ext/mysqli/mysqli_api.c diff -u php-src/ext/mysqli/mysqli_api.c:1.37 php-src/ext/mysqli/mysqli_api.c:1.38 --- php-src/ext/mysqli/mysqli_api.c:1.37 Fri Jul 18 02:17:39 2003 +++ php-src/ext/mysqli/mysqli_api.c Mon Jul 28 06:23:36 2003 @@ -15,7 +15,7 @@ | Author: Georg Richter <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: mysqli_api.c,v 1.37 2003/07/18 06:17:39 georg Exp $ + $Id: mysqli_api.c,v 1.38 2003/07/28 10:23:36 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -120,7 +120,7 @@ if (zend_hash_num_elements(Z_ARRVAL_P(types)) != argc - start) { /* number of bind variables doesn't match number of elements in array */ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of elements in type array doesn't match number of bind variables"); - } + } /* prevent leak if variables are already bound */ if (stmt->param.var_cnt) { @@ -1677,23 +1677,22 @@ /* }}} */ /* {{{ proto void mysqli_stmt_data_seek(object stmt, int offset) -Move internal result pointer */ + Move internal result pointer */ PHP_FUNCTION(mysqli_stmt_data_seek) { -STMT *stmt; -zval *mysql_stmt; -PR_STMT *prstmt; -long offset; - -if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &mysql_stmt, mysqli_stmt_class_entry, &offset) == FAILURE) { - return; -} + STMT *stmt; + zval *mysql_stmt; + PR_STMT *prstmt; + long offset; -MYSQLI_FETCH_RESOURCE(stmt, STMT *, prstmt, PR_STMT *, &mysql_stmt, "mysqli_stmt"); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &mysql_stmt, mysqli_stmt_class_entry, &offset) == FAILURE) { + return; + } + MYSQLI_FETCH_RESOURCE(stmt, STMT *, prstmt, PR_STMT *, &mysql_stmt, "mysqli_stmt"); -mysql_stmt_data_seek(stmt->stmt, offset); -return; + mysql_stmt_data_seek(stmt->stmt, offset); + return; } /* }}} */ @@ -1709,6 +1708,7 @@ 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 *, prstmt, PR_STMT *, &mysql_stmt, "mysqli_stmt"); rc = mysql_stmt_num_rows(stmt->stmt); Index: php-src/ext/mysqli/mysqli_nonapi.c diff -u php-src/ext/mysqli/mysqli_nonapi.c:1.13 php-src/ext/mysqli/mysqli_nonapi.c:1.14 --- php-src/ext/mysqli/mysqli_nonapi.c:1.13 Fri Jul 18 02:17:39 2003 +++ php-src/ext/mysqli/mysqli_nonapi.c Mon Jul 28 06:23:36 2003 @@ -15,7 +15,7 @@ | Author: Georg Richter <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: mysqli_nonapi.c,v 1.13 2003/07/18 06:17:39 georg Exp $ + $Id: mysqli_nonapi.c,v 1.14 2003/07/28 10:23:36 sniper Exp $ */ #ifdef HAVE_CONFIG_H @@ -146,7 +146,8 @@ /* {{{ proto resource mysqli_query(object link, string query [,int resultmode]) Send a MySQL query */ -PHP_FUNCTION(mysqli_query) { +PHP_FUNCTION(mysqli_query) +{ MYSQL *mysql; zval *mysql_link; MYSQLI_RESOURCE *mysqli_resource;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php