mySQL Host access

Peter Haworth pete at lcsql.com
Thu Jan 7 20:01:40 EST 2016


Hi Alex,
You're probably right on the lc server issue (and thanks for the
compliment).

I already had a library of php db access scripts on my server which I've
been using in batch cron jobson a nightly basis so the guts of what I
needed to do was already in place, whereas I have never installed LC server
or used it.  Now that it's all working I will probably try using LC
server.  My web host is Dreamhost - does anyone know if they support LC
server?

I have all this working now using php middleware.  I ended up using the LC
post command with a command code that indicates what SQL action is required
plus other parameters that contain the required data for the SQL action.

The php script return a JSON containing either the data from SELECT
statements, number of rows affected for INSERT/UPDATE/DELETE, or error
message information if there's a mySQL error.

No SQL commands are sent out, they are all constructed by the sever php
script.  I think, but would like opinions, that doing it that way means I
can embed the data in the SQL commands and not have to worry about
injection attacks since the actual SQL commands go directly from my php
script to mySQL.

Thanks for everyone's input on this.

On Thu, Jan 7, 2016 at 4:17 PM Lyn Teyla <lyn.teyla at gmail.com> wrote:

> Peter Haworth wrote:
>
> > Is this common practice when accessing mySQL on a host server?  If so, is
> > there a better way to set about accessing a mySQL database in these
> > circumstances, perhaps using php scripts on the server instead of
> accessing
> > the db directly with the LC database functions?
>
> One of my hosting providers HostM.com has been offering a free
> LiveCode-based MariaDB/MySQL API solution. It was previously available only
> to clients who needed this setup.
>
> I told them about the widespread interest in the LiveCode community for
> such a solution, and they’ve kindly made their API demo available for free
> download by any LiveCode developer.
>
> You can download it at:
>
> https://www.hostm.com/tutorials/livecode/api-mariadb-mysql
>
> Hope this helps!
>
> Lyn
>
>
>
> _______________________________________________
> 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