Connecting Stack to Remote On-Rev MySQL Database

Sarah Reichelt sarah.reichelt at gmail.com
Mon Feb 15 18:47:36 EST 2010


On Tue, Feb 16, 2010 at 3:24 AM, Rick Harrison
<harrison at all-auctions.com> wrote:
> Hi Sarah,
>
> So from this I'm assuming you are talking about using
> a revbrowser concept to get the information into and
> out of the database from within my stack?

No, I don't use revBrowser, I just do something like this:

     put "http://myname.on-rev.com/database.irev" into tPage
     put "param1=" & URLencode(param1) into tPost
     put "&param2=" & URLencode(param2) after tPost

     post tPost to URL tPage
     put it into tData

where param1 & param2 contain the details of my query, e.g. the table
name & field to select.
Then I get back whatever the iRev file "put", into my tData variable.

Very fast and if you already have the irev files talking to the
database, then you are nearly there. You just need to read the $_POST
array to see if any parameters have been sent.

The nice thing about this option is that the permissions remain the
defaults and the database can still only be accessed locally, giving
you more control over it.

Cheers,
Sarah



More information about the use-livecode mailing list