data insertion using fnx basic into mysql

In this category you can exchange your programming questions and solutions.
Post Reply
necmigulen
Posts: 2
Joined: Tue Nov 08, 2005 3:00 pm

data insertion using fnx basic into mysql

Post: # 179Post necmigulen
Mon Oct 15, 2007 9:32 am

well [ch305] have seen mysql example ;
     there is / db.query("INSERT INTO mytable (name,zipcode,address) VALUES(`john`,`1234`,`bublestreet`)") to insert values into
mysql table  .
How can [ch305] insert form textbox value into these query.
               

Marco
Site Admin
Posts: 246
Joined: Sat Sep 15, 2018 8:41 pm

data insertion using fnx basic into mysql

Post: # 180Post Marco
Tue Oct 16, 2007 9:22 pm

Hi,

the db.query is the mysql command in a string:
db.query(string)
dim a as string
dim name as string,zip as string,address as string
name=edit.text ``etc

So you can construct a string with the mysql commands, with this one it looks like this:

a="INSERT INTO mytable (name,zipcode,address) VALUES(`"
a=a+name+"``,``"
a=a+zip+"`,`"
a=a+address+"`"

db.query(a)

Hope this will help, best regards

Post Reply