1
0
mirror of https://github.com/php/php-src.git synced 2026-04-08 08:33:06 +02:00

Make fbsql_list_fields work as documented

This commit is contained in:
Frank M. Kromann
2001-11-10 07:43:23 +00:00
parent ad6607332b
commit 95ee25ace6

View File

@@ -2014,7 +2014,7 @@ PHP_FUNCTION(fbsql_list_fields)
RETURN_FALSE;
}
sprintf(sql, "EXTRACT TABLE %s;", tableName);
sprintf(sql, "SELECT * FROM %s WHERE 1=0;", tableName);
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;
FBCPList* value;
if (result->rowCount == 0 || result->rowIndex >= result->rowCount) {
RETURN_FALSE;
}
value = (FBCPList*)fbcplValueAtIndex(result->list, result->rowIndex);
key = (char*)fbcplKeyAtIndex(result->list, result->rowIndex);
if (key && key[0] == 2)
key = NULL;