georg Fri Feb 14 11:31:51 2003 EDT Modified files: /php4/ext/mysqli mysqli_api.c Log: bind_result fix Index: php4/ext/mysqli/mysqli_api.c diff -u php4/ext/mysqli/mysqli_api.c:1.4 php4/ext/mysqli/mysqli_api.c:1.5 --- php4/ext/mysqli/mysqli_api.c:1.4 Thu Feb 13 12:15:22 2003 +++ php4/ext/mysqli/mysqli_api.c Fri Feb 14 11:31:51 2003 @@ -15,7 +15,7 @@ | Author: Georg Richter <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: mysqli_api.c,v 1.4 2003/02/13 17:15:22 edink Exp $ + $Id: mysqli_api.c,v 1.5 2003/02/14 16:31:51 georg Exp $ */ #ifdef HAVE_CONFIG_H @@ -282,12 +282,12 @@ case MYSQL_TYPE_LONGLONG: stmt->bind[ofs].type = IS_STRING; - stmt->bind[ofs].buflen = (stmt->stmt->fields) ? stmt->stmt->fields[ofs].length + 1 : 256; + stmt->bind[ofs].buflen = sizeof(my_ulonglong); stmt->bind[ofs].buffer = (char *)emalloc(stmt->bind[ofs].buflen); bind[ofs].buffer_type = MYSQL_TYPE_LONGLONG; bind[ofs].buffer = stmt->bind[ofs].buffer; bind[ofs].is_null = &stmt->is_null[ofs]; - bind[ofs].buffer_length = stmt->bind[ofs].buflen - 1; + bind[ofs].buffer_length = stmt->bind[ofs].buflen; break; case MYSQL_TYPE_DATE: case MYSQL_TYPE_TIME: @@ -298,15 +298,16 @@ case MYSQL_TYPE_BLOB: case MYSQL_TYPE_TIMESTAMP: stmt->bind[ofs].type = IS_STRING; - stmt->bind[ofs].buflen = (stmt->stmt->fields) ? stmt->stmt->fields[ofs].length + 1: 256; + stmt->bind[ofs].buflen = (stmt->stmt->fields) ? +stmt->stmt->fields[ofs].length + 1: 250; stmt->bind[ofs].buffer = (char *)emalloc(stmt->bind[ofs].buflen); bind[ofs].buffer_type = MYSQL_TYPE_STRING; bind[ofs].buffer = stmt->bind[ofs].buffer; bind[ofs].is_null = &stmt->is_null[ofs]; bind[ofs].buffer_length = stmt->bind[ofs].buflen; + bind[ofs].length = &stmt->bind[ofs].buflen; break; } - bind[ofs].length = &stmt->bind[ofs].buflen; +// bind[ofs].length = &stmt->bind[ofs].buflen; } if (mysql_bind_result(stmt->stmt, bind)) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php