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 02ed033..2dbb34a 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) {