aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CustomQuery.m
diff options
context:
space:
mode:
authorjakob <jakob@eggerapps.at>2009-03-20 17:54:04 +0000
committerjakob <jakob@eggerapps.at>2009-03-20 17:54:04 +0000
commit7b2ffd4372883d9a6fa23ed4d181c09c5cb921e4 (patch)
tree0eb9107468a0228dae86d90c609592c62eddea9f /Source/CustomQuery.m
parentddf7d62d20614111acdd420075ef762d6deaa8d7 (diff)
downloadsequelpro-7b2ffd4372883d9a6fa23ed4d181c09c5cb921e4.tar.gz
sequelpro-7b2ffd4372883d9a6fa23ed4d181c09c5cb921e4.tar.bz2
sequelpro-7b2ffd4372883d9a6fa23ed4d181c09c5cb921e4.zip
- changed the status message after executing a custom query to read "1 row affected" / "6 rows affected" rather than "1 row(s) affected"
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r--Source/CustomQuery.m38
1 files changed, 27 insertions, 11 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 94ec6cba..a955bec3 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -346,18 +346,34 @@ sets the tableView columns corresponding to the mysql-result
// Set up the status string
if ( totalQueriesRun > 1 ) {
- [affectedRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%i total row(s) affected, by %i queries taking %@", @"text showing how many rows have been affected by multiple queries"),
- totalAffectedRows,
- totalQueriesRun,
- [NSString stringForTimeInterval:executionTime]
- ]];
+ if (totalAffectedRows==1) {
+ [affectedRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"1 row affected in total, by %i queries taking %@", @"text showing one row has been affected by multiple queries"),
+ totalQueriesRun,
+ [NSString stringForTimeInterval:executionTime]
+ ]];
+
+ } else {
+ [affectedRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%i rows affected in total, by %i queries taking %@", @"text showing how many rows have been affected by multiple queries"),
+ totalAffectedRows,
+ totalQueriesRun,
+ [NSString stringForTimeInterval:executionTime]
+ ]];
+
+ }
} else {
- [affectedRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%i row(s) affected, taking %@", @"text showing how many rows have been affected by a single query"),
- totalAffectedRows,
- [NSString stringForTimeInterval:executionTime]
- ]];
- }
-
+ if (totalAffectedRows==1) {
+ [affectedRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"1 row affected, taking %@", @"text showing one row has been affected by a single query"),
+ [NSString stringForTimeInterval:executionTime]
+ ]];
+ } else {
+ [affectedRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%i rows affected, taking %@", @"text showing how many rows have been affected by a single query"),
+ totalAffectedRows,
+ [NSString stringForTimeInterval:executionTime]
+ ]];
+
+ }
+ }
+
if ( !theResult || ![theResult numOfRows] ) {
//no rows in result
//free tableView