Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3442652
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:41:42+00:00 2026-05-18T08:41:42+00:00

I have a MySQL database on a web server and need to read the

  • 0

I have a MySQL database on a web server and need to read the data from an iPhone app. What is the best way to do this? The data needs to be accessed from the web server and will be updated from time to time. Is the NSURL Class the way to go?

thanks for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:41:43+00:00Added an answer on May 18, 2026 at 8:41 am

    I suggest a simple web technology on the server side — PHP, Ruby on Rails, etc. — that acts as a basic RESTful-ish web service that sends out JSON. This is straightforward and doesn’t require a lot of programming expertise — outputting JSON via PHP requires a single line of code, and the request to grab the data requires only a handful, for example.

    On the iPhone side, ASIHTTPRequest makes it stunningly easy to create asynchronous requests for updates and SBJSON makes turning the received data into an NSArray of NSDictionaries incredibly easy, just a couple of lines of code.

    The key to making it all work is making certain that you keep close track on data modification dates, both for ensuring new records are downloaded and for making certain the iPhone receives every updated record.

    For example, each record on the MYSQL server could have a LastModified field, one that uses the on update CURRENT_TIMESTAMP command to keep the field up to date. On the iPhone you’ll store these dates as well. When the device requests and update it first looks for the latest LastModified date for the table it’s updating and sends that to the server. The server code sends back all records where LastModified is greater than the date sent in.

    This can be further streamlined by having a DateCreated field on the server side for each record as well. This allows the server to return two sets of data, one where the DateCreated field is greater than the LastModified date sent in — these will be inserts into the iPhone database — and one set where the LastModified server date is later than the one sent in but the DateCreated field is less than or equal to the date sent in — these are the data rows that need updating.

    I just wrote an app that does this, so the issues are fresh in my mind. Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On my Unix web server, I have two MySQL database servers running. One on
I have a PHP web application which uses a MySQL database for object tagging,
I have a mysql database set as utf-8, and csv data set as utf-8,
I have a MySql database with three tables I need to combine in a
I need to serve up large files (> 2gb) from an Apache web server.
I am basically trying to retrieve some data from a MySql server, and display
I have an iPhone app out that stores data on the device. I want
I have a MySQL database behind a firewall which can only be accessed via
I have a MySQL database table with a couple thousand rows. The table is
I have a MySQL database of keywords that are presently mixed-case. However, I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.