mysql_db: get not more than num_fields fields from a row
I haven't tested the old approach, because i have never installed
or used mysql. But it's nice to see that it actually works with
this small patch.
committer: Markus Bröker <mbroeker@largo.homelinux.org>
package org.homelinux.largo.app;
import org.homelinux.largo.sql.client.DBClient;
public class App {
public static void main (String args[]) {
try {
DBClient db = new DBClient ();
db.query ("select * from euroleague order by team");
while (db.hasNext ()) {
System.out.println (db.getColumn (1));
}
db.close ();
} catch (Exception e) {
e.printStackTrace ();
}
}
}