I'm trying to understand how to use mysql-native driver.
I have a database named "gksu" and a table named "news", the third column has the type "text". writeln()
just outputs an array of some numbers. How can I convert them to the normal text/string?
Here is a part of my code:
auto mdb = new MysqlDB("localhost", "gksu", "pass", "gksu");
auto c = mdb.lockConnection();
scope(exit){
c.close();
}
try {
c.selectDB("gksu");
auto com = Command(c);
com.sql = "SELECT * FROM news LIMIT 0, 30";
ResultSet rs = com.execSQLResult();
writeln(rs[0][2].toString());
} catch(Exception x) {
writeln("Execption: ", x.msg);
}
test