php, sqlite & iphone

rhkennerly
rhkennerly used Ask the Experts™
on
we're researching a request to build a web interface and data tool between an iPhone sqlite app and php.  Update of db will be bidirectional.  

We're a Dreamweaver shop and don't know of any native way to connect or set a translator in between sqlite and mysql in php, as we'd do with an XML style sheet.  

Any pointers on getting me started?

Rick
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2016

Commented:
What does this mean, "Update of db will be bidirectional."  

I can certainly help with the PHP and MySQL part if you can describe the data fields that need to be communicated and stored.

Author

Commented:
Thanks, Ray.

By bidirectional, I mean the DBs need to sync iPhone app to Website as well as Website to iPhone app.  My idea was to just use sqlite for both, but I'm having a heck of a time figuring out how to connect to sqlite in php.  
Most Valuable Expert 2011
Top Expert 2016
Commented:
It would seem to me that the iPhone and web site could easily use two different data bases - the functions for each would be wrapped in some kind of abstraction layer.  

It's not all that hard to find learning resources for PHP+SQLite; here are a couple that seem pretty strong to me(the extension has been around for more than 5 years):
http://php.net/manual/en/book.sqlite.php
http://devzone.zend.com/article/760

That said, I have used Dreamweaver very little and there may be hurdles that I am not expecting.  When I have built web applications on top of Dreamweaver, we did the following:

1. Set up the server to parse ".html" files through the PHP engine.
2. Added a single PHP statement to the top of every web page, like this:
<?php require_once('config.php'); ?>
3. Interspersed our PHP code into the HTML, mostly with include() statements.

The "config.php" file set up a working PHP environment for the rest of the PHP code that was needed in any of the web pages (not all of them needed PHP, but the environment was set up anyway so that we had a consistent framework throughout the site).  It contained the code that started sessions, that read and analyzed the cookies, the data base connection and selection, the local class and function definitions, etc.

Is this any help?  Since I don't really know what you are doing with the XML part of this, I may be overlooking something.

Author

Commented:
I'm afraid you're right.  'll keep working it.
Most Valuable Expert 2011
Top Expert 2016

Commented:
Thanks for the points - good luck with the project, ~Ray

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial