• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SMySQL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SMySQL


  • Subject: Re: SMySQL
  • From: Andreas Mayer <email@hidden>
  • Date: Fri, 9 Jan 2004 10:45:33 +0100

Am 08.01.2004 um 23:03 schrieb Sascha Kuehn:

does someone already play with the SMySQL framwork?

Yes.

How did you make a connection and how did you make
a select-statement?

[self setMainConnection:[[MCPConnection alloc] initToHost:@"localhost" withLogin:@"login" password:@"pwd" usingPort:0]];
if (mainConnection) {
if (![mainConnection selectDB:@"database"]) {
NSLog(@"error opening database");
[self closeDatabase];
} else {
result = YES;
}
} else {
NSLog(@"error connecting to MySQL");
}

NSMutableString *insertQuery = [NSString stringWithFormat:@"SELECT * FROM tablename"];
MCPResult *__attribute__((__unused__))queryResult = [mainConnection queryString:insertQuery];
if (queryResult) {
if ([queryResult numOfRows] > 0) {
result = [queryResult fetchColAtIndex:0];
}
}


bye. Andreas.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >SMySQL (From: Sascha Kuehn <email@hidden>)

  • Prev by Date: Re: Running an SQLite application on another machine
  • Next by Date: Re: Getting a callback before repain
  • Previous by thread: Running an SQLite application on another machine
  • Next by thread: SMySQL
  • Index(es):
    • Date
    • Thread