From: Steinar H. Gunderson Date: Fri, 18 Feb 2005 17:13:13 +0000 (+0000) Subject: Fetch the title, not some random ID. X-Git-Url: https://git.sesse.net/?p=ccbs;a=commitdiff_plain;h=c2208d9a688b56565cd84db6152181ebd26781a0;ds=sidebyside Fetch the title, not some random ID. --- diff --git a/bigscreen/ccbs_bigscreen.cpp b/bigscreen/ccbs_bigscreen.cpp index 02ed033..2dbb34a 100644 --- a/bigscreen/ccbs_bigscreen.cpp +++ b/bigscreen/ccbs_bigscreen.cpp @@ -13,7 +13,7 @@ int main(int argc, char **argv) // 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) {