georg Tue Jul 15 10:00:19 2003 EDT
Modified files:
/php-src/ext/mysqli php_mysqli.h mysqli_api.c mysqli_fe.c
Log:
added new function mysqli_stmt_data_seek
Index: php-src/ext/mysqli/php_mysqli.h
diff -u php-src/ext/mysqli/php_mysqli.h:1.18 php-src/ext/mysqli/php_mysqli.h:1.19
--- php-src/ext/mysqli/php_mysqli.h:1.18 Tue Jul 15 06:37:19 2003
+++ php-src/ext/mysqli/php_mysqli.h Tue Jul 15 10:00:18 2003
@@ -15,7 +15,7 @@
| Author: Georg Richter <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: php_mysqli.h,v 1.18 2003/07/15 10:37:19 georg Exp $
+ $Id: php_mysqli.h,v 1.19 2003/07/15 14:00:18 georg Exp $
*/
/* A little hack to prevent build break, when mysql is used together with
@@ -266,6 +266,7 @@
PHP_FUNCTION(mysqli_stat);
PHP_FUNCTION(mysqli_stmt_affected_rows);
PHP_FUNCTION(mysqli_stmt_close);
+PHP_FUNCTION(mysqli_stmt_data_seek);
PHP_FUNCTION(mysqli_stmt_errno);
PHP_FUNCTION(mysqli_stmt_error);
PHP_FUNCTION(mysqli_stmt_num_rows);
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.35 php-src/ext/mysqli/mysqli_api.c:1.36
--- php-src/ext/mysqli/mysqli_api.c:1.35 Tue Jul 15 06:37:19 2003
+++ php-src/ext/mysqli/mysqli_api.c Tue Jul 15 10:00:18 2003
@@ -15,7 +15,7 @@
| Author: Georg Richter <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: mysqli_api.c,v 1.35 2003/07/15 10:37:19 georg Exp $
+ $Id: mysqli_api.c,v 1.36 2003/07/15 14:00:18 georg Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -454,7 +454,7 @@
}
/* }}} */
-/* {{{ proto void mysqli_data_seek(object result)
+/* {{{ proto void mysqli_data_seek(object result, int offset)
Move internal result pointer */
PHP_FUNCTION(mysqli_data_seek)
{
@@ -464,7 +464,7 @@
PR_COMMAND *prcommand;
long offset;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Orl",
&mysql_result, mysqli_result_class_entry, &mysql_result, &offset) == FAILURE) {
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol",
&mysql_result, mysqli_result_class_entry, &offset) == FAILURE) {
return;
}
@@ -1671,6 +1671,27 @@
MYSQLI_CLEAR_RESOURCE(&mysql_stmt);
RETURN_TRUE;
+}
+/* }}} */
+
+/* {{{ proto void mysqli_stmt_data_seek(object stmt, int offset)
+ 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;
+ }
+
+ MYSQLI_FETCH_RESOURCE(stmt, STMT *, prstmt, PR_STMT *, &mysql_stmt,
"mysqli_stmt");
+
+
+ mysql_stmt_data_seek(stmt->stmt, offset);
+ return;
}
/* }}} */
Index: php-src/ext/mysqli/mysqli_fe.c
diff -u php-src/ext/mysqli/mysqli_fe.c:1.14 php-src/ext/mysqli/mysqli_fe.c:1.15
--- php-src/ext/mysqli/mysqli_fe.c:1.14 Sat Jun 28 17:27:08 2003
+++ php-src/ext/mysqli/mysqli_fe.c Tue Jul 15 10:00:19 2003
@@ -15,7 +15,7 @@
| Author: Georg Richter <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: mysqli_fe.c,v 1.14 2003/06/28 21:27:08 georg Exp $
+ $Id: mysqli_fe.c,v 1.15 2003/07/15 14:00:19 georg Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -116,6 +116,7 @@
PHP_FE(mysqli_stat,
NULL)
PHP_FE(mysqli_stmt_affected_rows, NULL)
PHP_FE(mysqli_stmt_close,
NULL)
+ PHP_FE(mysqli_stmt_data_seek, NULL)
PHP_FE(mysqli_stmt_errno,
NULL)
PHP_FE(mysqli_stmt_error,
NULL)
PHP_FE(mysqli_stmt_num_rows, NULL)
@@ -234,6 +235,7 @@
PHP_FALIAS(send_long_data,mysqli_send_long_data,NULL)
PHP_FALIAS(store_result,mysqli_stmt_store_result,NULL)
PHP_FALIAS(close,mysqli_stmt_close,NULL)
+ PHP_FALIAS(data_seek,mysqli_stmt_data_seek,NULL)
PHP_FALIAS(errno,mysqli_stmt_errno,NULL)
PHP_FALIAS(error,mysqli_stmt_error,NULL)
PHP_FALIAS(num_rows, mysqli_stmt_num_rows,NULL)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php