Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tutorials > Tutorial Requests

Reply
 
LinkBack Thread Tools Display Modes
Old 06-02-2009, 01:19 PM   #1 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 11
Default Tutorial Request: Connecting iPhone App to MYSQL using JSON or XML

I've googled my fingers off and still haven't found either good sample code or how exactly to do this. I am looking for ALL of the code so I can understand how to do a select query on a mysql database using PHP & JSON or PHP & XML. I have JSON installed locally in my app but that is about as far as I was able to get.



Thanks!
cobroke is offline   Reply With Quote
Old 08-03-2009, 05:42 PM   #2 (permalink)
Registered Member
 
Join Date: Jul 2009
Posts: 36
Default mysql web database PHP

I have the same question. Does anyone have a response?

Quote:
Originally Posted by cobroke View Post
I've googled my fingers off and still haven't found either good sample code or how exactly to do this. I am looking for ALL of the code so I can understand how to do a select query on a mysql database using PHP & JSON or PHP & XML. I have JSON installed locally in my app but that is about as far as I was able to get.



Thanks!
blmohr is offline   Reply With Quote
Old 08-08-2009, 11:08 AM   #3 (permalink)
Tutorial Author
 
Join Date: Jan 2009
Posts: 144
Default

Simply put a PHP script on your server that takes arguments in the post:

example:

myscript.php?username=bob

if bob exists in the mysql table, print "YES" to the webpage.

Then use NSString's initWithContentsOfURL to get that value from the webpage. It's that simple.
meowmix23F is offline   Reply With Quote
Old 10-15-2009, 11:23 AM   #4 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 2
Default

hiya, I'm new to iPhone app development, and I'm kinda jumping in at the deep end... sorry if this is a stupid question :S

can we use this to retrieve names and passages of text from mysql?
160740 is offline   Reply With Quote
Old 10-19-2009, 06:49 AM   #5 (permalink)
Registered Member
 
Join Date: Dec 2008
Posts: 11
Default

Anything you can do in PHP you could port over to the iPhone.

Well kinda, you could port over the data that the PHP document would return. Hope that helps you.
russellharrower is offline   Reply With Quote
Old 11-01-2009, 01:54 AM   #6 (permalink)
Registered Member
 
Join Date: Dec 2008
Posts: 11
Default

Just a quick question, How do I pass the Bob to the link that gets the result?
I have a search box in the view but i don't know how to take the text from that and add it to the end of the link?

Can anyone help
russellharrower is offline   Reply With Quote
Old 10-08-2010, 02:25 AM   #7 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 7
Default remote database connectivity

I need to connect mysql database with my iphone application.once the user clicks button the value need to store in mysql database which is in another machine.

please send me the sample code for mysql database connectivity..

Last edited by nandhini; 10-08-2010 at 02:27 AM.
nandhini is offline   Reply With Quote
Reply

Bookmarks

Tags
iphone, mysql, php

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 267
18 members and 249 guests
14DEV, ADY, ArtieFufkin10, Dani77, HemiMG, IphoneSdk, jakerocheleau, JasonR, jimbo, MACralik, NSeven, prchn4christ, Rudy, silverwiz, spiderguy84
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,767
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:56 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0