//
//  ApexMobileDB.h
//  Apex Mobile
//
//  Created by Ray on 14-2-28.
//  Copyright (c) 2014年 United Software Applications, Inc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>  
#import "Constant.h"
#import "ApexMobileAppDelegate.h"
#define DBNAME    @"ApexMobile.db"  

@interface ApexMobileDB : NSObject
+ (BOOL) initializeDb;
+ (sqlite3*) get_db;
+(void)execSql:(NSString *)sql db:(sqlite3 *)db;
+(NSArray*) get_searchhistory:(NSString*) field;
+(NSArray*) get_Location;
+(void) savehistory:(NSString*) field value:(NSString*) value;
+ (int) get_recordid:(sqlite3*)db table:(NSString*) tablename where:(NSString*) whereclause order:(NSString*) orderby;
+ (int) get_recordid:(sqlite3*)db table:(NSString*) tablename where:(NSString*) whereclause;
+(BOOL)checkForField:(NSString *)table field:(NSString *)field db:(sqlite3 *)db;
@end
