mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
added new function mysqli_stmt_data_seek
This commit is contained in:
parent
5c09a9e42f
commit
db398787e6
@ -454,7 +454,7 @@ PHP_FUNCTION(mysqli_commit)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ 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 @@ PHP_FUNCTION(mysqli_data_seek)
|
||||
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;
|
||||
}
|
||||
|
||||
@ -1674,6 +1674,27 @@ PHP_FUNCTION(mysqli_stmt_close)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ 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;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto mixed mysqli_stmt_num_rows(object stmt)
|
||||
Return the number of rows in statements result set */
|
||||
PHP_FUNCTION(mysqli_stmt_num_rows)
|
||||
|
@ -116,6 +116,7 @@ function_entry mysqli_functions[] = {
|
||||
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 @@ function_entry mysqli_stmt_methods[] = {
|
||||
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)
|
||||
|
@ -266,6 +266,7 @@ PHP_FUNCTION(mysqli_ssl_set);
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user