mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
Make fbsql_list_fields work as documented
This commit is contained in:
parent
ad6607332b
commit
95ee25ace6
1 changed files with 2 additions and 5 deletions
|
@ -2014,7 +2014,7 @@ PHP_FUNCTION(fbsql_list_fields)
|
||||||
RETURN_FALSE;
|
RETURN_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(sql, "EXTRACT TABLE %s;", tableName);
|
sprintf(sql, "SELECT * FROM %s WHERE 1=0;", tableName);
|
||||||
|
|
||||||
phpfbQuery(INTERNAL_FUNCTION_PARAM_PASSTHRU, sql, phpLink);
|
phpfbQuery(INTERNAL_FUNCTION_PARAM_PASSTHRU, sql, phpLink);
|
||||||
}
|
}
|
||||||
|
@ -2738,12 +2738,9 @@ static void php_fbsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
|
||||||
char* key;
|
char* key;
|
||||||
FBCPList* value;
|
FBCPList* value;
|
||||||
|
|
||||||
if (result->rowCount == 0 || result->rowIndex >= result->rowCount) {
|
|
||||||
RETURN_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
value = (FBCPList*)fbcplValueAtIndex(result->list, result->rowIndex);
|
value = (FBCPList*)fbcplValueAtIndex(result->list, result->rowIndex);
|
||||||
key = (char*)fbcplKeyAtIndex(result->list, result->rowIndex);
|
key = (char*)fbcplKeyAtIndex(result->list, result->rowIndex);
|
||||||
|
|
||||||
if (key && key[0] == 2)
|
if (key && key[0] == 2)
|
||||||
key = NULL;
|
key = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue