Legacy GM how to send and receive sql data

royer14

Member
Hi, I have had this doubt for a long time and my goal is only to store, for example, game scores in a sql or mysql database. I have the following commands in sql.

Code:
1)   mysql.connector.connect(host="remotemysql.com", database="yvrcdG", user="yvdG",password="hdE7W",port=3306)

2)  "UPDATE `tabla` SET `name`=........................................."

3)   "INSERT INTO `tabla`(`name`, `Score`, `Comment`) VALUES ('Royer',5,'Interesting')"
many say that I should use http_get and set but I don't understand very well how I can use it in this situation.
 

FrostyCat

Member
You're getting advice from a bunch of amateurs at best if many of them think GET is appropriate for your situation. Requests that involve creating new resources should always be done over POST.

The idea here is to create a web endpoint that accepts your request via HTTPS or HTTP, then proxies the database calls for you. Here is an old post from me with an example for how to retrieve and submit data this way.
 

NightFrost

Member
You may also want to consider changing some of your SQL connection details as you just posted them to a public forum for all to see.
 

royer14

Member
You may also want to consider changing some of your SQL connection details as you just posted them to a public forum for all to see.
excuse me, edit
1) mysql.connector.connect(host="remotemysql.com", database="yvRswCrcdG", user="yvRswCrcdG",password="hRoTaydE7W",port=3306)

2) "UPDATE `tabla1` SET `name`=........................................."

3) "INSERT INTO `tabla`(`name`, `Score`, `Comment`) VALUES ('Royer',5,'Interesting')"
 
Top