I have a project where dynamically creating tables in database. And I didn't know what is table are used in some moment. And want something like this:
[db executeQuery:@"INSERT INTO %@Table (image) VALUES (?)",tableName,imageData];
But it didn't work. How can I solve this problem?
You can create a string and then use this string to do the query, something like that:
NSString* queryStr = [NSString stringWithFormat:@"INSERT INTO %@(image) VALUES (?) ",tableName];
[db executeQuery:queryStr,imageData];