Ok the next step is now to run it from Blitz. simply use:
Execfile "command /c mysql ..."
where ... are the parameters like before.
Now this isn't very useful since it will simply output the data to the msdos console that will disappear quickly.
Now you need to redirect the output to a textfile. The easiest way is to use the msdos redirection feature that goes like this: simply add the string ">answer.txt" at the end of the line, so it will store the answer in the file "answer.txt". You can then use Blitzes File commands to read and parse the File line by line.
So in blitz your call is (a Blitz Command!):
This means, whatever you want to do, you just write the batch.txt using Blitzes Writefile Commands, then execute the mysql Path using ExecFile, then read in the answer.txt. This will give you total control over the database.
There is only a little drawback now, it's the msdos box that will popup for some millisecs, but even this can be hidden if it needs to be like that.
Execfile "command /c mysql ..."
where ... are the parameters like before.
Now this isn't very useful since it will simply output the data to the msdos console that will disappear quickly.
Now you need to redirect the output to a textfile. The easiest way is to use the msdos redirection feature that goes like this: simply add the string ">answer.txt" at the end of the line, so it will store the answer in the file "answer.txt". You can then use Blitzes File commands to read and parse the File line by line.
So in blitz your call is (a Blitz Command!):
ExecFile "command /c mysql --user=lexdark_gameuser --host=lexdark.com --password=**** --database=lexdark_game <batch.txt >answer.txt"
This means, whatever you want to do, you just write the batch.txt using Blitzes Writefile Commands, then execute the mysql Path using ExecFile, then read in the answer.txt. This will give you total control over the database.
There is only a little drawback now, it's the msdos box that will popup for some millisecs, but even this can be hidden if it needs to be like that.