Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can start off with connecting a MySQL DB because setting up MySQL is pretty simple. Try <a href="http://www.karlkraft.com/index.php/2010/06/02/mysql-and-objective-c/" rel="nofollow noreferrer">this</a>.</p> <p>This seems like a simliar question. What I would suggest you is that learn basics of PHP, connecting to MySQL via PHP and read all your database contents and echo it as a JSON, your mobile client can use a <a href="https://stackoverflow.com/questions/4025349/is-there-an-3rd-party-library-for-parsing-json-on-the-iphone/4025379#4025379">JSON parser</a> that would parse and give you valid information that was echoed from your PHP script.</p> <p>For setting up Apache, MySQL , PHP you can go with <a href="http://www.mamp.info/en/index.html" rel="nofollow noreferrer"> MAMP for mac</a> or if windows try <a href="http://www.wampserver.com/en/" rel="nofollow noreferrer">WAMP server</a></p> <p>I have done a small service with MAMP, just echoing a JSON to a client</p> <pre><code>&lt;?php // Returns: ["Apple","Banana","Pear"] echo json_encode(array(fruit1=&gt;"Apple", fruit2=&gt;"Banana", fruit3=&gt;"Pear",fruit4=&gt;"JackFruit",fruit5=&gt;"Guava",fruit6=&gt;"Pomogrenate")); ?&gt; </code></pre> <p>So instead of hardcoded values you should fetch results from your MySQL db and echo it.</p> <pre><code>&lt;?php $con=mysqli_connect("localhost or host name","username","password","databasename"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $result = mysqli_query($con,"SELECT * FROM Persons"); while($row = mysqli_fetch_array($result)) { echo json_encode(array(firstname=&gt;$row['FirstName'],lastname=&gt;$row['LastName'])); echo "&lt;br /&gt;"; } mysqli_close($con); ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload