Re: Lengthy questions from a newbie (and a new problem)
Re: Lengthy questions from a newbie (and a new problem)
- Subject: Re: Lengthy questions from a newbie (and a new problem)
- From: Benjamin Einstein <email@hidden>
- Date: Wed, 21 Jun 2006 19:45:25 -0400
Of course that worked. I feel like I should start paying you guys.
I'm going to spend a minute or two reading up on stringWithFormat to
see what that works, but thanks again!
On Jun 21, 2006, at 7:39 PM, Ryan Britton wrote:
On Jun 21, 2006, at 4:26 PM, Benjamin Einstein wrote:
Does anyone outthere have experience with MCPKit (formerly known
as SMySQL)? I'm running into quite a strange problem. Connecting
to the database and running queries seems to work very well unless
you want to use a string created at runtime. Here's where we get
stuck:
theResult = [theConnection queryString:(@"SELECT password FROM
users WHERE username = '%@'", username)];
I'm not sure if the -queryString: method can take a format list,
but this is definitely not the to do it if it can. Try:
theResult = [theConnection queryString:[NSString
stringWithFormat:@"SELECT password FROM users WHERE username = '%
@'", username]];
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden