mirror of
https://github.com/php/php-src.git
synced 2025-01-18 09:43:36 +08:00
Fix the 4.0 tree (forgot to commit)
This commit is contained in:
parent
cb25b1222e
commit
f3e63d9e71
@ -85,6 +85,9 @@ static int le_result,le_link,le_plink;
|
||||
#define MYSQL_NUM 1<<1
|
||||
#define MYSQL_BOTH (MYSQL_ASSOC|MYSQL_NUM)
|
||||
|
||||
#define PHP_MYSQL_VALID_RESULT(mysql) \
|
||||
(mysql_num_fields(mysql)>0)
|
||||
|
||||
function_entry mysql_functions[] = {
|
||||
PHP_FE(mysql_connect, NULL)
|
||||
PHP_FE(mysql_pconnect, NULL)
|
||||
@ -822,7 +825,7 @@ PHP_FUNCTION(mysql_query)
|
||||
}
|
||||
#endif
|
||||
if ((mysql_result=mysql_store_result(mysql))==NULL) {
|
||||
if (mysql_num_fields(mysql_result)>0) { /* query should have returned rows */
|
||||
if (PHP_MYSQL_VALID_RESULT(mysql)) { /* query should have returned rows */
|
||||
php_error(E_WARNING, "MySQL: Unable to save result set");
|
||||
RETURN_FALSE;
|
||||
} else {
|
||||
@ -883,7 +886,7 @@ PHP_FUNCTION(mysql_db_query)
|
||||
}
|
||||
#endif
|
||||
if ((mysql_result=mysql_store_result(mysql))==NULL) {
|
||||
if (mysql_num_fields(mysql_result)>0) { /* query should have returned rows */
|
||||
if (PHP_MYSQL_VALID_RESULT(mysql)) { /* query should have returned rows */
|
||||
php_error(E_WARNING, "MySQL: Unable to save result set");
|
||||
RETURN_FALSE;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user