From c2208d9a688b56565cd84db6152181ebd26781a0 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 18 Feb 2005 17:13:13 +0000 Subject: [PATCH] Fetch the title, not some random ID. --- bigscreen/ccbs_bigscreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.39.2