' MySQL Test Program
INCLUDE mysql.bas
dbh = mysql::RealConnect("localhost","root","","test")
mysql::query(dbh,"SELECT * FROM mytable")
WHILE mysql::FetchHash(dbh,column)
PRINT "| "
PRINT column{"ID"}," | "
PRINT column{"Name"}," | "
PRINT column{"Address"}," | "
PRINT column{"Phone"}," | "
PRINTNL
WEND
PRINTNL
PRINT "The database handle is: ",dbh,"\n"
PRINT "Affected rows by SELECT: ",mysql::AffectedRows(dbh),"\n"
PRINT "Character set name is: ",mysql::CharacterSetName(dbh),"\n"
PRINT "Last error is: ",mysql::ErrorMessage(dbh),"\n"
PRINT "Client info is: ",mysql::GetClientInfo(),"\n"
PRINT "Host info is: ",mysql::GetHostInfo(dbh),"\n"
PRINT "Proto info is: ",mysql::GetProtoInfo(dbh),"\n"
PRINT "Server info is: ",mysql::GetServerInfo(dbh),"\n"
PRINT "PING result: ",mysql::Ping(dbh),"\n"
PRINT "Thread ID: ",mysql::ThreadId(dbh),"\n"
PRINT "Status is: ",mysql::Stat(dbh),"\n"
mysql::Close(dbh)
END