Global variable not working on web
Posted: Thu Dec 09, 2010 4:20 am
This is my first attempt with Livecode (4.5.1), and I'm trying to convert an ASP.NET / MS SQL application to Livecode / Mysql. I have converted the MS SQL to MySQL migration and have built a prototype of part of the application. Everything works fine within the IDE (developing on a MAC), and if I create a standalone MAC app it works fine. My web app is failing however.
My entry screen has a combo box which the user selects from. I load this information into a global variable. The next cards are populated from mysql based on the value of the global variable. When I dump the global to the screen, I see it is the correct value on the entry card, but it is always 1 on the following cards.
This is the code that runs and fails:
I tried the application on both Safari and Firefox and the result is the same. I'm I missing something about global variables?
My entry screen has a combo box which the user selects from. I load this information into a global variable. The next cards are populated from mysql based on the value of the global variable. When I dump the global to the screen, I see it is the correct value on the entry card, but it is always 1 on the following cards.
This is the code that runs and fails:
Code: Select all
on opencard
global gGIDX
answer gGIDX
put label of button tseason & "/1/1" into sDate
put label of button tseason & "/12/31" into eDate
put getConnectID() into DbID
put emtpy into theSQL
put "call ScoreByGrpPly(" & gGIDX & ",'" & sdate & "','" & eDate & "');" into theSQL