aboutsummaryrefslogtreecommitdiffstats
path: root/TableDocument.m
diff options
context:
space:
mode:
Diffstat (limited to 'TableDocument.m')
-rw-r--r--TableDocument.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/TableDocument.m b/TableDocument.m
index d380b681..59aad2e0 100644
--- a/TableDocument.m
+++ b/TableDocument.m
@@ -439,9 +439,9 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
MCPResult *queryResult = [mySQLConnection listDBs];
+ if ([queryResult numOfRows]) [queryResult dataSeek:0];
int i;
for ( i = 0 ; i < [queryResult numOfRows] ; i++ ) {
- [queryResult dataSeek:i];
[chooseDatabaseButton addItemWithTitle:[[queryResult fetchRowAsArray] objectAtIndex:0]];
}
if ( ![self database] ) {
@@ -1013,8 +1013,8 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa
}
//get variables
theResult = [mySQLConnection queryString:@"SHOW VARIABLES"];
+ if ([theResult numOfRows]) [theResult dataSeek:0];
for ( i = 0 ; i < [theResult numOfRows] ; i++ ) {
- [theResult dataSeek:i];
[tempResult addObject:[theResult fetchRowAsDictionary]];
}
variables = [[NSArray arrayWithArray:tempResult] retain];