Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cloud

macrumors member
Original poster
Jul 4, 2002
40
0
The Matrix
Good day all!

I will begin learning how to make iPhone apps, but one of the things I really need to find out is how do you link an iPhone app's SQL database to a website's SQL database.

I was looking around the web for info, but I didn't see any. If you can point me in the right direction (website or book), please do so! I appreciate your time and help guys and gals!

:apple:
 
The iPhone uses SQLite not a fully-compliant SQL Database (it's close though). So you first need to make sure that the features/operations you want are supported by SQLite 3.

Then, your website code will need to have access to the SQLite database file. Java Sevlets and JSPs can do this (if you get the correct JDBC JAR File). I **think** there's a PHP library for SQLite, but I'm not 100% sure.

I assume you want to have the same file being used on the iPhone and a different copy on the website?
 
The iPhone uses SQLite not a fully-compliant SQL Database (it's close though). So you first need to make sure that the features/operations you want are supported by SQLite 3.

Then, your website code will need to have access to the SQLite database file. Java Sevlets and JSPs can do this (if you get the correct JDBC JAR File). I **think** there's a PHP library for SQLite, but I'm not 100% sure.

I assume you want to have the same file being used on the iPhone and a different copy on the website?

Well, I wanted the iPhone to be able to pull from the same database as a website. I don't know if XML is better for that or not, though. :(
 
Well, I wanted the iPhone to be able to pull from the same database as a website. I don't know if XML is better for that or not, though. :(

I don't know if the iPhone SDK has the MySQL drivers built-in or not. But it's conceivable to make the iPhone just act as a DB client.

But I would recommend having a web-based front-end that serves XML or some other interface you design.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.