I set this in a .h file:
#define ID_ACTIVE 2
then used this in a .m file sqlite statement:
NSString *query = @"SELECT task FROM tasks WHERE task_state = 'ID_ACTIVE'";
but when I look at ‘query’ via gdb it gives me this query statement:
SELECT task FROM tasks WHERE task_state = 'ID_ACTIVE'
Shouldn’t the preprocessor have replaced ID_ACTIVE with 2?
In your code, you can use the ID_ACTIVE as an int variable.
If task_state is a string, use,
If it is a number, then use,