diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPTableData.m | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/SPTableData.m b/Source/SPTableData.m index e348ac79..fee2e85e 100644 --- a/Source/SPTableData.m +++ b/Source/SPTableData.m @@ -715,7 +715,9 @@ } // Run the status query and retrieve as a dictionary. - CMMCPResult *tableStatusResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW TABLE STATUS LIKE '%@'", [tableListInstance tableName]]]; + NSMutableString *escapedTableName = [NSMutableString stringWithString:[tableListInstance tableName]]; + [escapedTableName replaceOccurrencesOfString:@"'" withString:@"\\\'" options:0 range:NSMakeRange(0, [escapedTableName length])]; + CMMCPResult *tableStatusResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW TABLE STATUS LIKE '%@'", escapedTableName ]]; // Check for any errors, only displaying them if the connection hasn't been terminated if (![[mySQLConnection getLastErrorMessage] isEqualToString:@""]) { |