summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_nonapi.c
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2010-12-12 16:17:50 +0000
committerKalle Sommer Nielsen <kalle@php.net>2010-12-12 16:17:50 +0000
commitb529d43c0d24e512b23d3c780dbc96668a8fe380 (patch)
treea24d644f660aeded1c5f614648456becac1de1ef /ext/mysqli/mysqli_nonapi.c
parent79aaaf417960e685b55c18cfdf30f078cff03dea (diff)
downloadphp-git-b529d43c0d24e512b23d3c780dbc96668a8fe380.tar.gz
Fixed bug #53503 (mysqli::query returns false after successful LOAD DATA query)
Diffstat (limited to 'ext/mysqli/mysqli_nonapi.c')
-rw-r--r--ext/mysqli/mysqli_nonapi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c
index 72b242a662..8a570842e1 100644
--- a/ext/mysqli/mysqli_nonapi.c
+++ b/ext/mysqli/mysqli_nonapi.c
@@ -538,7 +538,7 @@ PHP_FUNCTION(mysqli_query)
result = mysql_use_result(mysql->mysql);
break;
}
- if (!result) {
+ if (!result && mysql_errno(mysql->mysql)) {
php_mysqli_throw_sql_exception((char *)mysql_sqlstate(mysql->mysql), mysql_errno(mysql->mysql) TSRMLS_CC,
"%s", mysql_error(mysql->mysql));
RETURN_FALSE;