georg Tue Jan 27 08:56:04 2004 EDT Modified files: /php-src/ext/mysqli mysqli_api.c Log: changed prototype mysql_dataseek from void to bool add check for specified offset http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.65&r2=1.66&ty=u Index: php-src/ext/mysqli/mysqli_api.c diff -u php-src/ext/mysqli/mysqli_api.c:1.65 php-src/ext/mysqli/mysqli_api.c:1.66 --- php-src/ext/mysqli/mysqli_api.c:1.65 Tue Jan 27 08:23:54 2004 +++ php-src/ext/mysqli/mysqli_api.c Tue Jan 27 08:56:03 2004 @@ -15,7 +15,7 @@ | Author: Georg Richter <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: mysqli_api.c,v 1.65 2004/01/27 13:23:54 georg Exp $ + $Id: mysqli_api.c,v 1.66 2004/01/27 13:56:03 georg Exp $ */ #ifdef HAVE_CONFIG_H @@ -420,7 +420,7 @@ } /* }}} */ -/* {{{ proto void mysqli_data_seek(object result, int offset) +/* {{{ proto bool mysqli_data_seek(object result, int offset) Move internal result pointer */ PHP_FUNCTION(mysqli_data_seek) { @@ -436,11 +436,15 @@ if (result->handle && result->handle->status == MYSQL_STATUS_USE_RESULT) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Function cannot be used with MYSQL_USE_RESULT"); - RETURN_LONG(0); + RETURN_FALSE; + } + + if (!offset || offset >= result->row_count) { + RETURN_FALSE; } mysql_data_seek(result, offset); - return; + RETURN_TRUE; } /* }}} */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php