开发者

ASIHTTPRequest DB query/get?

开发者 https://www.devze.com 2023-03-22 07:15 出处:网络
I\'m trying to use ASIHTTPRequest for the first time and struggling to find an example to do the following;

I'm trying to use ASIHTTPRequest for the first time and struggling to find an example to do the following;

Input box (user enters a name) with a 'lookup' butto开发者_StackOverflow社区n, once the user clicks the button, it looks up the DB for that 'name' and if found, returns with the names email address.

There is 2 columns in the DB- 'name' and 'email'.

How could I do the above or is there an example?

Thanks!


Im assuming this is a remote server DB.

I would suggest using a PHP or similar script to query your DB rather than directly accessing it remotely. This helps with security and simplifies the interface.

Be sure to protect against unauthorised accesss by using an api key-signature method or similar.

Also I would suggest using the NSURLRequest and NSURLConnection classes over the ASI wrapper, they are quite simple to use and avoid third party code.

0

精彩评论

暂无评论...
验证码 换一张
取 消