Using Post tData?

Earthednet-wp prothero at earthednet.org
Mon Sep 23 01:20:34 EDT 2013


John,
I use post and php for remote MySQL database interaction. To use the LC MySQL commands directly, you have to open permissions to the database to the world (assuming your app accesses it). This makes an extremely insecure system. You can open an ssh tunnel using shell commands, but I find the php solution more to my liking.
Good luck,
Bill

William Prothero
http://es.earthednet.org

On Sep 22, 2013, at 8:42 PM, JOHN PATTEN <johnpatten at me.com> wrote:

> Hi All…
> 
> I would like to be able to pull data into a livecode project from an on-rev mysql database. It currently works in a  browser as a simple web app and is built all on in php. 
> 
> I thought I may be able to just use the post command, however when I try to post some data to a php url that executes a query on the database and then echoes back the results all I get in an "answer it" is the first header line, "Assigned Resources," and no array results. Here is the abbreviated php code:
> 
> mysql_connect;
> $result = mysql_query("SELECT urladdress, urltitle FROM urllist WHERE docid = '$doccode'");
> 
> echo "<table border='1'>
> <tr>
> <th>Assigned Resources</th>
> </tr>";
> 
> while($row = mysql_fetch_array($result))
>  {
>  echo "<tr>";
> 
>  echo "<td><. $row['urladdress'] . </td>";
>  echo "</tr>";
>  }
> echo "</td></table>";
> 
> This works fine in the browser, but I was hoping to use all these php database connections in the web app within a stack and an iOS app. Any recommendations, or should I abandon ship, and go in a different direction to access the mysql data from within a lc stack?
> 
> Thanks in advance!
> 
> John Patten
> SUSD
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the Use-livecode mailing list