¡@

Home 

2014/10/15 ¤U¤È 10:08:35

iphone Programming Glossary: executequery

Trying to Fetching data from sqlite database

http://stackoverflow.com/questions/10847001/trying-to-fetching-data-from-sqlite-database

@ my.sqlite FMDatabase database FMDatabase databaseWithPath path database open FMResultSet s database executeQuery @ SELECT COUNT FROM Contacts while s next int totalCount s intForColumnIndex 0 NSLog @ Count i totalCount FMResultSet results.. Contacts while s next int totalCount s intForColumnIndex 0 NSLog @ Count i totalCount FMResultSet results database executeQuery @ select from Contacts while results next NSString contact_id results stringForColumn @ contact_id NSString name results..

Listing All Folder content from Google Drive

http://stackoverflow.com/questions/17995787/listing-all-folder-content-from-google-drive

GTLQueryDrive query2 GTLQueryDrive queryForChildrenListWithFolderId @ root query2.maxResults 1000 self.driveService executeQuery query2 completionHandler ^ GTLServiceTicket ticket GTLDriveChildList children NSError error NSLog @ nGoogle Drive file.. child in children GTLQuery query GTLQueryDrive queryForFilesGetWithFileId child.identifier self.driveService executeQuery query completionHandler ^ GTLServiceTicket ticket GTLDriveFile file NSError error NSLog @ nfile name @ file.originalFilename.. root root is for root folder replace it with folder identifier in case to fetch any specific folder self.driveService executeQuery query completionHandler ^ GTLServiceTicket ticket GTLDriveFileList files NSError error if error nil driveFiles NSMutableArray..

How to export SQLite file into CSV file in iPhone SDK

http://stackoverflow.com/questions/4656887/how-to-export-sqlite-file-into-csv-file-in-iphone-sdk

You can do that like this FMDatabase db FMDatabase alloc initWithPath @ path to db file FMResultSet results db executeQuery @ SELECT FROM tableName while results nextRow NSDictionary resultRow results resultDict NSArray orderedKeys resultRow allKeys.. initWithPath @ path to db file if db open couldn't open the database db release return nil FMResultSet results db executeQuery @ SELECT FROM tableName CHCSVWriter csvWriter CHCSVWriter alloc initWithCSVFile @ path to csv file atomic NO while results..