Question: I had a application that was written for iphone SDK3.2 and now I want that application to be upgraded to full fill multi tasking...
I just compiled it to SDK4.0 actually it has to get upgraded and when the home button is pressed it should 1st go to applicationWillResignActive and then it should goto
 applicationDidEnterBackground but my application is not calling applicationDidEnterBackground but it is calling applicationWillTerminate...
Should I need to add any code to prevent this to happen if so, Please any one help me in solving this...

Waiting for reply...

~Raviraja

Answer: 
Assuming you have a `DATETIME` column named `created` in your table:

```
SELECT id FROM tablename 
WHERE ((created > DATE_SUB(NOW(), INTERVAL 15 MINUTE))
  AND (created < NOW()))

```
```
select * from table WHERE datetimeField BETWEEN date_add(NOW(),INTERVAL -15 MINUTE) AND NOW();

```