Re: Simple .lc Script to INSERT data...?

2015-06-18 Thread Bob Sneidar
That should be built into the script editor. There was something like it in 
GLX2.

Bob S


On Jun 17, 2015, at 08:50 , Peter M. Brigham 
pmb...@gmail.commailto:pmb...@gmail.com wrote:

I use Jacque's scriptPaint handler instead of explicitVariables -- just set the 
insertion point, then hover over a word in a script, press shift-control-space 
(my script shortcuts are all shift-control-key), and presto, the mouseword is 
copied and placed into the insertion point. End of misspelling variable names.

-- Peter

Peter M. Brigham

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Simple .lc Script to INSERT data...?

2015-06-17 Thread Peter M. Brigham
I use Jacque's scriptPaint handler instead of explicitVariables -- just set the 
insertion point, then hover over a word in a script, press shift-control-space 
(my script shortcuts are all shift-control-key), and presto, the mouseword is 
copied and placed into the insertion point. End of misspelling variable names.

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig

On Jun 6, 2015, at 8:28 PM, Alex Tweedly wrote:

 Somebody has to say it 
 
 that's one of the reasons why Variable checking (aka explicitVariables) is 
 so useful, it helps to catch things like this.
 
 snip
 
 -- Alex.
 
 On 07/06/2015 00:59, Mike Bonner wrote:
 You're welcome.  Fresh eyes are usually pretty helpful. I get code blind
 LOTS and end up putting it away for a while in hopes that I'll get some of
 that freshness back.  Seldom works, but I keep trying!
 
 On Sat, Jun 6, 2015 at 4:46 PM, JOHN PATTEN johnpat...@me.com wrote:
 
 Yup. That was it… It’s incredible how easy it is to miss this kind of
 thing and waste time :(

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Simple .lc Script to INSERT data...?

2015-06-09 Thread Bob Sneidar
Often when encountering unexpected results like this I will step through the 
code and check the contents of every variable I touch. It’s tedious, but is the 
best way I have found to isolate this kind of bug. I actually have found other 
bugs I didn’t know about that way. 

Bob S


 On Jun 6, 2015, at 15:46 , JOHN PATTEN johnpat...@me.com wrote:
 
 Yup. That was it… It’s incredible how easy it is to miss this kind of thing 
 and waste time :( 
 
 I can’t wait until I can just tell the robot to write the code for what I 
 describe. The robot would never make this type of error ;)
 
 Thanks Again!
 
 
 On Jun 5, 2015, at 5:14 PM, Mike Bonner bonnm...@gmail.com wrote:
 
 You're putting your data to post into ArgList
 And you're posting tArgList
 
 If thats not a typo here, I suspect its the typo culprit there.
 
 On Fri, Jun 5, 2015 at 5:01 PM, JOHN PATTEN johnpat...@me.com wrote:
 
 Thanks Matthias,
 
 I did try both ways $_POST and $_GET.  I get the same results; a new
 record is created but the fields are empty.  By the way, the LiveCode
 Cloud tutorials show $_POST for inserting new record too.
 
 I’ll keep looking :)
 
 
 On Jun 5, 2015, at 3:39 PM, Matthias Rebbe | M-R-D 
 matthias_livecode_150...@m-r-d.de wrote:
 
 John,
 
 if you post data to a livecode server script then you need to use
 $_post[] instead of $_get
 
 $_get[] is used if you add the parameters to the url like
 
 put  URL (http://username.on-rev.com/ipad_1/add_datga_2.lc?object_name=“
  tName) into tResult
 
 Regards,
 
 Matthias
 
 
 
 
 Am 06.06.2015 um 00:31 schrieb JOHN PATTEN johnpat...@me.com:
 
 Hi All,
 
 I must be missing something simple and I can’t find it…
 
 I have a mysql database with one table and one field. Varchar(1000)
 
 I have a LiveCode project with one button and the following code:
 
 on mouseUp
 put urlEncode(the name of target) into tName
 put object_name=  tName into ArgList
 --answer ArgList
 post tArgList to URL http://username.on-rev.com/ipad_1/add_data_2.lc;
 end mouseUp
 
 
 My .lc file looks like this:
 
 ?lc
 put revOpenDatabase 
 (mysql”,username.on-rev.com”,username_ipad_2”,username_ipad_2”,password)
 into tConID
 put ipad_data into tTableName
 put $_GET[object_name] into object_name
 put object_name into tFields
 
 put INSERT INTO  tTableName  (  tFields  ) VALUES (:1);
 into tSQL
 
 revExecuteSQL tConID, tSQL, object_name
 revCloseDatabase tConID
 put empty
 ?
 
 The .lc script creates a new record but it never puts the name of the
 button in the object_name field? The record is completely empty.  I was
 having the same problem on a much more complex database and script, so I
 thought I would super simplify but I’m still having the problem.
 
 Does anybody see anything I’m missing?
 
 Thank you!
 John Patten
 SUSD
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Simple .lc Script to INSERT data...?

2015-06-06 Thread Alex Tweedly

Somebody has to say it 

that's one of the reasons why Variable checking (aka explicitVariables) 
is so useful, it helps to catch things like this.


Of course, it is unfortunately not available in LC Server scripts :-(
So I should go add an enhancement request.
The only reason I haven't done that before is that my typical LCServer 
script looks like


?lc
set the errormode to inline
start using stack thewholething
justdoit
?

and all the real code lives within stacks, which can be developed and 
debugged locally.


-- Alex.

On 07/06/2015 00:59, Mike Bonner wrote:

You're welcome.  Fresh eyes are usually pretty helpful. I get code blind
LOTS and end up putting it away for a while in hopes that I'll get some of
that freshness back.  Seldom works, but I keep trying!

On Sat, Jun 6, 2015 at 4:46 PM, JOHN PATTEN johnpat...@me.com wrote:


Yup. That was it… It’s incredible how easy it is to miss this kind of
thing and waste time :(

I can’t wait until I can just tell the robot to write the code for what I
describe. The robot would never make this type of error ;)

Thanks Again!



On Jun 5, 2015, at 5:14 PM, Mike Bonner bonnm...@gmail.com wrote:

You're putting your data to post into ArgList
And you're posting tArgList

If thats not a typo here, I suspect its the typo culprit there.

On Fri, Jun 5, 2015 at 5:01 PM, JOHN PATTEN johnpat...@me.com wrote:


Thanks Matthias,

I did try both ways $_POST and $_GET.  I get the same results; a new
record is created but the fields are empty.  By the way, the LiveCode
Cloud tutorials show $_POST for inserting new record too.

I’ll keep looking :)



On Jun 5, 2015, at 3:39 PM, Matthias Rebbe | M-R-D 

matthias_livecode_150...@m-r-d.de wrote:

John,

if you post data to a livecode server script then you need to use

$_post[] instead of $_get

$_get[] is used if you add the parameters to the url like

put  URL (

http://username.on-rev.com/ipad_1/add_datga_2.lc?object_name=“

 tName) into tResult

Regards,

Matthias





Am 06.06.2015 um 00:31 schrieb JOHN PATTEN johnpat...@me.com:

Hi All,

I must be missing something simple and I can’t find it…

I have a mysql database with one table and one field. Varchar(1000)

I have a LiveCode project with one button and the following code:

on mouseUp
put urlEncode(the name of target) into tName
put object_name=  tName into ArgList
--answer ArgList
post tArgList to URL http://username.on-rev.com/ipad_1/add_data_2.lc



end mouseUp


My .lc file looks like this:

?lc
put revOpenDatabase (mysql”,username.on-rev.com

”,username_ipad_2”,username_ipad_2”,password)

into tConID

put ipad_data into tTableName
put $_GET[object_name] into object_name
put object_name into tFields

put INSERT INTO  tTableName  (  tFields  ) VALUES (:1);

into tSQL

revExecuteSQL tConID, tSQL, object_name
revCloseDatabase tConID
put empty
?

The .lc script creates a new record but it never puts the name of the

button in the object_name field? The record is completely empty.  I was
having the same problem on a much more complex database and script, so I
thought I would super simplify but I’m still having the problem.

Does anybody see anything I’m missing?

Thank you!
John Patten
SUSD

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your

subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your

subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your

subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Simple .lc Script to INSERT data...?

2015-06-06 Thread Mike Bonner
You're welcome.  Fresh eyes are usually pretty helpful. I get code blind
LOTS and end up putting it away for a while in hopes that I'll get some of
that freshness back.  Seldom works, but I keep trying!

On Sat, Jun 6, 2015 at 4:46 PM, JOHN PATTEN johnpat...@me.com wrote:

 Yup. That was it… It’s incredible how easy it is to miss this kind of
 thing and waste time :(

 I can’t wait until I can just tell the robot to write the code for what I
 describe. The robot would never make this type of error ;)

 Thanks Again!


  On Jun 5, 2015, at 5:14 PM, Mike Bonner bonnm...@gmail.com wrote:
 
  You're putting your data to post into ArgList
  And you're posting tArgList
 
  If thats not a typo here, I suspect its the typo culprit there.
 
  On Fri, Jun 5, 2015 at 5:01 PM, JOHN PATTEN johnpat...@me.com wrote:
 
  Thanks Matthias,
 
  I did try both ways $_POST and $_GET.  I get the same results; a new
  record is created but the fields are empty.  By the way, the LiveCode
  Cloud tutorials show $_POST for inserting new record too.
 
  I’ll keep looking :)
 
 
  On Jun 5, 2015, at 3:39 PM, Matthias Rebbe | M-R-D 
  matthias_livecode_150...@m-r-d.de wrote:
 
  John,
 
  if you post data to a livecode server script then you need to use
  $_post[] instead of $_get
 
  $_get[] is used if you add the parameters to the url like
 
  put  URL (
 http://username.on-rev.com/ipad_1/add_datga_2.lc?object_name=“
   tName) into tResult
 
  Regards,
 
  Matthias
 
 
 
 
  Am 06.06.2015 um 00:31 schrieb JOHN PATTEN johnpat...@me.com:
 
  Hi All,
 
  I must be missing something simple and I can’t find it…
 
  I have a mysql database with one table and one field. Varchar(1000)
 
  I have a LiveCode project with one button and the following code:
 
  on mouseUp
  put urlEncode(the name of target) into tName
  put object_name=  tName into ArgList
  --answer ArgList
  post tArgList to URL http://username.on-rev.com/ipad_1/add_data_2.lc
 
  end mouseUp
 
 
  My .lc file looks like this:
 
  ?lc
  put revOpenDatabase (mysql”,username.on-rev.com
 ”,username_ipad_2”,username_ipad_2”,password)
  into tConID
  put ipad_data into tTableName
  put $_GET[object_name] into object_name
  put object_name into tFields
 
  put INSERT INTO  tTableName  (  tFields  ) VALUES (:1);
  into tSQL
 
  revExecuteSQL tConID, tSQL, object_name
  revCloseDatabase tConID
  put empty
  ?
 
  The .lc script creates a new record but it never puts the name of the
  button in the object_name field? The record is completely empty.  I was
  having the same problem on a much more complex database and script, so I
  thought I would super simplify but I’m still having the problem.
 
  Does anybody see anything I’m missing?
 
  Thank you!
  John Patten
  SUSD
 
  ___
  use-livecode mailing list
  use-livecode@lists.runrev.com
  Please visit this url to subscribe, unsubscribe and manage your
  subscription preferences:
  http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
  ___
  use-livecode mailing list
  use-livecode@lists.runrev.com
  Please visit this url to subscribe, unsubscribe and manage your
  subscription preferences:
  http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
  ___
  use-livecode mailing list
  use-livecode@lists.runrev.com
  Please visit this url to subscribe, unsubscribe and manage your
  subscription preferences:
  http://lists.runrev.com/mailman/listinfo/use-livecode
 
  ___
  use-livecode mailing list
  use-livecode@lists.runrev.com
  Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
  http://lists.runrev.com/mailman/listinfo/use-livecode


 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Simple .lc Script to INSERT data...?

2015-06-06 Thread JOHN PATTEN
Yup. That was it… It’s incredible how easy it is to miss this kind of thing and 
waste time :( 

I can’t wait until I can just tell the robot to write the code for what I 
describe. The robot would never make this type of error ;)

Thanks Again!


 On Jun 5, 2015, at 5:14 PM, Mike Bonner bonnm...@gmail.com wrote:
 
 You're putting your data to post into ArgList
 And you're posting tArgList
 
 If thats not a typo here, I suspect its the typo culprit there.
 
 On Fri, Jun 5, 2015 at 5:01 PM, JOHN PATTEN johnpat...@me.com wrote:
 
 Thanks Matthias,
 
 I did try both ways $_POST and $_GET.  I get the same results; a new
 record is created but the fields are empty.  By the way, the LiveCode
 Cloud tutorials show $_POST for inserting new record too.
 
 I’ll keep looking :)
 
 
 On Jun 5, 2015, at 3:39 PM, Matthias Rebbe | M-R-D 
 matthias_livecode_150...@m-r-d.de wrote:
 
 John,
 
 if you post data to a livecode server script then you need to use
 $_post[] instead of $_get
 
 $_get[] is used if you add the parameters to the url like
 
 put  URL (http://username.on-rev.com/ipad_1/add_datga_2.lc?object_name=“
  tName) into tResult
 
 Regards,
 
 Matthias
 
 
 
 
 Am 06.06.2015 um 00:31 schrieb JOHN PATTEN johnpat...@me.com:
 
 Hi All,
 
 I must be missing something simple and I can’t find it…
 
 I have a mysql database with one table and one field. Varchar(1000)
 
 I have a LiveCode project with one button and the following code:
 
 on mouseUp
 put urlEncode(the name of target) into tName
 put object_name=  tName into ArgList
 --answer ArgList
 post tArgList to URL http://username.on-rev.com/ipad_1/add_data_2.lc;
 end mouseUp
 
 
 My .lc file looks like this:
 
 ?lc
 put revOpenDatabase 
 (mysql”,username.on-rev.com”,username_ipad_2”,username_ipad_2”,password)
 into tConID
 put ipad_data into tTableName
 put $_GET[object_name] into object_name
 put object_name into tFields
 
 put INSERT INTO  tTableName  (  tFields  ) VALUES (:1);
 into tSQL
 
 revExecuteSQL tConID, tSQL, object_name
 revCloseDatabase tConID
 put empty
 ?
 
 The .lc script creates a new record but it never puts the name of the
 button in the object_name field? The record is completely empty.  I was
 having the same problem on a much more complex database and script, so I
 thought I would super simplify but I’m still having the problem.
 
 Does anybody see anything I’m missing?
 
 Thank you!
 John Patten
 SUSD
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Simple .lc Script to INSERT data...?

2015-06-05 Thread JOHN PATTEN
Hi All,

I must be missing something simple and I can’t find it…

I have a mysql database with one table and one field. Varchar(1000)

I have a LiveCode project with one button and the following code:

on mouseUp
   put urlEncode(the name of target) into tName
   put object_name=  tName into ArgList
   --answer ArgList
   post tArgList to URL http://username.on-rev.com/ipad_1/add_data_2.lc;
end mouseUp


My .lc file looks like this:

?lc
put revOpenDatabase 
(mysql”,username.on-rev.com”,username_ipad_2”,username_ipad_2”,password) 
into tConID
put ipad_data into tTableName
put $_GET[object_name] into object_name
put object_name into tFields

put INSERT INTO  tTableName  (  tFields  ) VALUES (:1); into tSQL

revExecuteSQL tConID, tSQL, object_name
revCloseDatabase tConID
put empty
?

The .lc script creates a new record but it never puts the name of the button in 
the object_name field? The record is completely empty.  I was having the same 
problem on a much more complex database and script, so I thought I would super 
simplify but I’m still having the problem.

Does anybody see anything I’m missing?

Thank you!
 John Patten
SUSD

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Simple .lc Script to INSERT data...?

2015-06-05 Thread Mike Bonner
You're putting your data to post into ArgList
And you're posting tArgList

If thats not a typo here, I suspect its the typo culprit there.

On Fri, Jun 5, 2015 at 5:01 PM, JOHN PATTEN johnpat...@me.com wrote:

 Thanks Matthias,

 I did try both ways $_POST and $_GET.  I get the same results; a new
 record is created but the fields are empty.  By the way, the LiveCode
 Cloud tutorials show $_POST for inserting new record too.

 I’ll keep looking :)


  On Jun 5, 2015, at 3:39 PM, Matthias Rebbe | M-R-D 
 matthias_livecode_150...@m-r-d.de wrote:
 
  John,
 
  if you post data to a livecode server script then you need to use
 $_post[] instead of $_get
 
  $_get[] is used if you add the parameters to the url like
 
  put  URL (http://username.on-rev.com/ipad_1/add_datga_2.lc?object_name=“
  tName) into tResult
 
  Regards,
 
  Matthias
 
 
 
 
  Am 06.06.2015 um 00:31 schrieb JOHN PATTEN johnpat...@me.com:
 
  Hi All,
 
  I must be missing something simple and I can’t find it…
 
  I have a mysql database with one table and one field. Varchar(1000)
 
  I have a LiveCode project with one button and the following code:
 
  on mouseUp
   put urlEncode(the name of target) into tName
   put object_name=  tName into ArgList
   --answer ArgList
   post tArgList to URL http://username.on-rev.com/ipad_1/add_data_2.lc;
  end mouseUp
 
 
  My .lc file looks like this:
 
  ?lc
  put revOpenDatabase 
  (mysql”,username.on-rev.com”,username_ipad_2”,username_ipad_2”,password)
 into tConID
  put ipad_data into tTableName
  put $_GET[object_name] into object_name
  put object_name into tFields
 
  put INSERT INTO  tTableName  (  tFields  ) VALUES (:1);
 into tSQL
 
  revExecuteSQL tConID, tSQL, object_name
  revCloseDatabase tConID
  put empty
  ?
 
  The .lc script creates a new record but it never puts the name of the
 button in the object_name field? The record is completely empty.  I was
 having the same problem on a much more complex database and script, so I
 thought I would super simplify but I’m still having the problem.
 
  Does anybody see anything I’m missing?
 
  Thank you!
  John Patten
  SUSD
 
  ___
  use-livecode mailing list
  use-livecode@lists.runrev.com
  Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
  http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
  ___
  use-livecode mailing list
  use-livecode@lists.runrev.com
  Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
  http://lists.runrev.com/mailman/listinfo/use-livecode


 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Simple .lc Script to INSERT data...?

2015-06-05 Thread Matthias Rebbe | M-R-D
John,

if you post data to a livecode server script then you need to use $_post[] 
instead of $_get

$_get[] is used if you add the parameters to the url like

put  URL (http://username.on-rev.com/ipad_1/add_datga_2.lc?object_name=“  
tName) into tResult

Regards,

Matthias




 Am 06.06.2015 um 00:31 schrieb JOHN PATTEN johnpat...@me.com:
 
 Hi All,
 
 I must be missing something simple and I can’t find it…
 
 I have a mysql database with one table and one field. Varchar(1000)
 
 I have a LiveCode project with one button and the following code:
 
 on mouseUp
   put urlEncode(the name of target) into tName
   put object_name=  tName into ArgList
   --answer ArgList
   post tArgList to URL http://username.on-rev.com/ipad_1/add_data_2.lc;
 end mouseUp
 
 
 My .lc file looks like this:
 
 ?lc
 put revOpenDatabase 
 (mysql”,username.on-rev.com”,username_ipad_2”,username_ipad_2”,password)
  into tConID
 put ipad_data into tTableName
 put $_GET[object_name] into object_name
 put object_name into tFields
 
 put INSERT INTO  tTableName  (  tFields  ) VALUES (:1); into tSQL
 
 revExecuteSQL tConID, tSQL, object_name
 revCloseDatabase tConID
 put empty
 ?
 
 The .lc script creates a new record but it never puts the name of the button 
 in the object_name field? The record is completely empty.  I was having the 
 same problem on a much more complex database and script, so I thought I would 
 super simplify but I’m still having the problem.
 
 Does anybody see anything I’m missing?
 
 Thank you!
 John Patten
 SUSD
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Simple .lc Script to INSERT data...?

2015-06-05 Thread JOHN PATTEN
Thanks Matthias,

I did try both ways $_POST and $_GET.  I get the same results; a new record is 
created but the fields are empty.  By the way, the LiveCode Cloud tutorials 
show $_POST for inserting new record too.

I’ll keep looking :)


 On Jun 5, 2015, at 3:39 PM, Matthias Rebbe | M-R-D 
 matthias_livecode_150...@m-r-d.de wrote:
 
 John,
 
 if you post data to a livecode server script then you need to use $_post[] 
 instead of $_get
 
 $_get[] is used if you add the parameters to the url like
 
 put  URL (http://username.on-rev.com/ipad_1/add_datga_2.lc?object_name=“  
 tName) into tResult
 
 Regards,
 
 Matthias
 
 
 
 
 Am 06.06.2015 um 00:31 schrieb JOHN PATTEN johnpat...@me.com:
 
 Hi All,
 
 I must be missing something simple and I can’t find it…
 
 I have a mysql database with one table and one field. Varchar(1000)
 
 I have a LiveCode project with one button and the following code:
 
 on mouseUp
  put urlEncode(the name of target) into tName
  put object_name=  tName into ArgList
  --answer ArgList
  post tArgList to URL http://username.on-rev.com/ipad_1/add_data_2.lc;
 end mouseUp
 
 
 My .lc file looks like this:
 
 ?lc
 put revOpenDatabase 
 (mysql”,username.on-rev.com”,username_ipad_2”,username_ipad_2”,password)
  into tConID
 put ipad_data into tTableName
 put $_GET[object_name] into object_name
 put object_name into tFields
 
 put INSERT INTO  tTableName  (  tFields  ) VALUES (:1); into tSQL
 
 revExecuteSQL tConID, tSQL, object_name
 revCloseDatabase tConID
 put empty
 ?
 
 The .lc script creates a new record but it never puts the name of the button 
 in the object_name field? The record is completely empty.  I was having the 
 same problem on a much more complex database and script, so I thought I 
 would super simplify but I’m still having the problem.
 
 Does anybody see anything I’m missing?
 
 Thank you!
 John Patten
 SUSD
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode