I look many sample code for storing data into sqlite but it work .How I store this
I am trying to add the the (newLocation.coordinate.latitude,newLocation.coordinate.longitude)
into sqlite database .
I find this (newLocation.coordinate.latitude,newLocation.coordinate.longitude)
from here
-(void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
if (newLocation)
{
// make sure the old and new coordinates are different
if ((oldLocation.coordinate.latitude != newLocation.coordinate.latitude) &&
(oldLocation.coordinate.longitude != newLocation.coordinate.longitude))
{
//I think Here will my sqlite query for storing the newLocation.coordinate.latitude and newLocation.coordinate.longitude
//But I dont know how i store this location into the sqlite database.
}
}
}
How can i do .Can anyone help me out from this.
you can use this statement….
sqlite3_bind_double(stmt, 1, newLocation.coordinate.latitude);