]> git.sesse.net Git - ccbs/commitdiff
Fetch the title, not some random ID.
authorSteinar H. Gunderson <sesse@samfundet.no>
Fri, 18 Feb 2005 17:13:13 +0000 (17:13 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Fri, 18 Feb 2005 17:13:13 +0000 (17:13 +0000)
bigscreen/ccbs_bigscreen.cpp

index 02ed0335b93d5510fb62f7037f777decca8da30c..2dbb34a81fe21ac37550cbac08caaf1332b6bc92 100644 (file)
@@ -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) {