// fetch all songs
pqxx::result res( t.exec("SELECT * FROM songs") );
for (pqxx::result::const_iterator i = res.begin(); i != res.end(); ++i) {
- std::fprintf(stderr, "%s\n", i[0].as(std::string()).c_str());
+ std::fprintf(stderr, "%s\n", i["title"].c_str());
}
t.commit();
} catch (const std::exception &e) {