Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

How can I get the contents of my query with mysql.au3?

$
0
0
I have these scripts which seem woking until I try to display the query contents of a table of my SQL database (I use the latest AutoIt version):

#include "mysql.au3"

_MySQLConnect ($UserName, $Password, $Database, $MySQLServerName)
$SQLCode = "SELECT * FROMTable1WHERE Col1 = '2012-12-30' "
$result = _Query ($SQLInstance, $SQLCode)


The result return 0 = successful

However, I can't get the contents of my query, I did try to use:

a)

_MySQLConnect ($UserName, $Password, $Database, $MySQLServerName)
$SQLCode = "SELECT * FROMTable1WHERE Col1 = '2012-12-30' "
$TableContents = _Query ($SQLInstance, $SQLCode)

With $TableContents
   While NOT .EOF
   FileWriteLine("c:\test.txt",.Fields("Description").value & @CRLF)
   .MoveNext
   WEnd
EndWith


- But it shows error:  ==> Only Object-type variables allowed in a "With" statement.:

B)  _SQLExecute ($SQLInstance, $SQLCode)     ... but the mysql.au3 doesn't have this function

*) Someone can help me somehow to get the results from my query?  :sweating:

Thanks for any help or advice.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>