summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Richter <georg@php.net>2004-01-31 07:51:03 +0000
committerGeorg Richter <georg@php.net>2004-01-31 07:51:03 +0000
commitcccb92b23354337c16e05f76025204d64e4671aa (patch)
treee7c9547aaba8b13b9a752f6c57f399782c7ca362
parent5eb038002eb3d74e4357b763f111d7fef6d15b86 (diff)
downloadphp-git-cccb92b23354337c16e05f76025204d64e4671aa.tar.gz
Corrected binding:
if column has type DECIMAL it will converted to string now. Thanks to Brian Aker for pointing this out.
-rw-r--r--ext/mysqli/mysqli_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index ac23dde850..6d1432ebf8 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -258,7 +258,6 @@ PHP_FUNCTION(mysqli_bind_result)
col_type = (stmt->stmt->fields) ? stmt->stmt->fields[ofs].type : MYSQL_TYPE_STRING;
switch (col_type) {
- case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_DOUBLE:
case MYSQL_TYPE_FLOAT:
convert_to_double_ex(args[i]);
@@ -300,6 +299,7 @@ PHP_FUNCTION(mysqli_bind_result)
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_TIMESTAMP:
+ case MYSQL_TYPE_DECIMAL:
stmt->result.buf[ofs].type = IS_STRING;
stmt->result.buf[ofs].buflen = (stmt->stmt->fields) ? stmt->stmt->fields[ofs].length + 1: 256;
stmt->result.buf[ofs].buffer = (char *)emalloc(stmt->result.buf[ofs].buflen);