Using a card to make modifications to database
Fred Giannetto
fgiannet at hotmail.com
Thu Oct 6 15:24:30 EDT 2005
And helped it did!!!
I threw some quotes around those variables and they are getting plugged into
the database without a problem.
Thank you very much
All best Always
Fred
>From: Jan Schenkel <janschenkel at yahoo.com>
>Reply-To: How to use Revolution <use-revolution at lists.runrev.com>
>To: How to use Revolution <use-revolution at lists.runrev.com>
>Subject: RE: Using a card to make modifications to database
>Date: Tue, 4 Oct 2005 21:32:19 -0700 (PDT)
>
>--- Fred Giannetto <fgiannet at hotmail.com> wrote:
> > Here is a copy of my script. The point is for users
> > to enter data into the
> > card and the submit button have the data inserted
> > into the database. The
> > sql works when submitted directly into the database.
> >
> > on mouseUp
> > put field "Name" into tName
> > put field "Team" into tTeam
> > put field "Position" into tPosition
> > put field "Rushing" into tRushing
> > put field "Receiving" into tReceiving
> > get revOpenDatabases("MYSQL", "localhost", "test",
> > root, root1)
> > put it into tDatabaseID
> > answer tName, tTeam, tPosition, tRushing,
> > tReceiving, tDatabaseID
> > revExecuteSQL tDatabaseID,"insert into
> > test.nflstats(Name, Team, Position,
> > Rushing, Receiving) values(tName, tTeam, tPosition,
> > tRushing, tReceiving)"
> > end mouseUp
> >
> > I have the tDatabaseID variable to make sure I am
> > recording the Database ID
> >
> > Thank you for your assistance, There will be a lot
> > of progress once I get
> > past these elementary hurdles
> > All best Always
> > Fred
> >
>
>Hi Fred,
>
>The database functions will not check the queries for
>te presence of variable names and fill in he data.
>Here's a quick alternative, which uses the built-in
>substitution scheme:
>--
> revExecuteSQL tDatabaseID,"insert into
> test.nflstats(Name, Team, Position,
> Rushing, Receiving) values(:1,:2,:3,:4,:5)", tName,
>tTeam, tPosition,
> tRushing, tReceiving
>--
>See the docs for a full explanation.
>
>Hope this helped,
>
>Jan Schenkel.
>
>Quartam - Tools for Revolution
><http://www.quartam.com>
>
>=====
>"As we grow older, we grow both wiser and more foolish at the same time."
>(La Rochefoucauld)
>
>
>
>__________________________________
>Yahoo! Mail - PC Magazine Editors' Choice 2005
>http://mail.yahoo.com
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list