Read from MySQL

 
I was studying an example code for inserting data from MQL4 into MySQL database. However, can somebody please be so good and show me a correct example of reading the result of a simple query into a variable in MQL4? Thank you!
 
hunsheridan:
I was studying an example code for inserting data from MQL4 into MySQL database. However, can somebody please be so good and show me a correct example of reading the result of a simple query into a variable in MQL4? Thank you!
Im not an expert really, but I guess if you'd make your own DLL with functions to query MySQL DB and then link it to your MQL code, then you'd be able to do what u want.
 
andrewk1983:
hunsheridan:
I was studying an example code for inserting data from MQL4 into MySQL database. However, can somebody please be so good and show me a correct example of reading the result of a simple query into a variable in MQL4? Thank you!
Im not an expert really, but I guess if you'd make your own DLL with functions to query MySQL DB and then link it to your MQL code, then you'd be able to do what u want.
I'm sorry I forgot to tell that I'm importing the mysql.dll that comes with the mysql distribution on Windows.

I've already managed to insert data by examining the code 'TicksInMySQL'

It helped me a lot for inserts and now is working perfectly. All I need to figure out is how I get data result of query back from MySQL.
 
one solution is to use query SELECT .. INTO .. text file and then read that file in mql4
Reason: