georg Thu Apr 3 03:03:59 2003 EDT
Modified files:
/php4/ext/mysqli mysqli_api.c
Log:
fixed mysqli_prepare_result
Index: php4/ext/mysqli/mysqli_api.c
diff -u php4/ext/mysqli/mysqli_api.c:1.21 php4/ext/mysqli/mysqli_api.c:1.22
--- php4/ext/mysqli/mysqli_api.c:1.21 Mon Mar 17 07:48:38 2003
+++ php4/ext/mysqli/mysqli_api.c Thu Apr 3 03:03:59 2003
@@ -15,7 +15,7 @@
| Author: Georg Richter <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $Id: mysqli_api.c,v 1.21 2003/03/17 12:48:38 hholzgra Exp $
+ $Id: mysqli_api.c,v 1.22 2003/04/03 08:03:59 georg Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -1342,10 +1342,11 @@
*/
PHP_FUNCTION(mysqli_prepare_result)
{
- STMT *stmt;
- MYSQL_RES *result;
- zval *mysql_stmt;
- PR_STMT *prstmt;
+ STMT *stmt;
+ MYSQL_RES *result;
+ zval *mysql_stmt;
+ PR_STMT *prstmt = NULL;
+ MYSQLI_RESOURCE *mysqli_resource;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
&mysql_stmt, mysqli_stmt_class_entry) == FAILURE) {
return;
@@ -1356,7 +1357,10 @@
RETURN_FALSE;
}
- MYSQLI_RETURN_RESOURCE(result, mysqli_result_class_entry);
+ mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE));
+ mysqli_resource->ptr = (void *)result;
+ mysqli_resource->prinfo = (void *)prstmt;
+ MYSQLI_RETURN_RESOURCE(mysqli_resource, mysqli_result_class_entry);
}
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php