Author: wyoung
Date: Mon Mar  6 23:02:58 2006
New Revision: 1234

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1234&view=rev
Log:
Added print_stock_table()

Modified:
    branches/v2.1-bakefile/examples/util.cpp
    branches/v2.1-bakefile/examples/util.h

Modified: branches/v2.1-bakefile/examples/util.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/branches/v2.1-bakefile/examples/util.cpp?rev=1234&r1=1233&r2=1234&view=diff
==============================================================================
--- branches/v2.1-bakefile/examples/util.cpp (original)
+++ branches/v2.1-bakefile/examples/util.cpp Mon Mar  6 23:02:58 2006
@@ -201,6 +201,18 @@
 }
 
 
+//// print_stock_table /////////////////////////////////////////////////
+// Simply retrieve and print the entire contents of the stock table.
+
+void
+print_stock_table(mysqlpp::Query& query)
+{
+       mysqlpp::Result res;
+       get_stock_table(query, res);
+       print_stock_rows(res);
+}
+
+
 //// connect_to_db /////////////////////////////////////////////////////
 // Establishes a connection to a MySQL database server, optionally
 // attaching to database kdb.  This is basically a command-line parser

Modified: branches/v2.1-bakefile/examples/util.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/branches/v2.1-bakefile/examples/util.h?rev=1234&r1=1233&r2=1234&view=diff
==============================================================================
--- branches/v2.1-bakefile/examples/util.h (original)
+++ branches/v2.1-bakefile/examples/util.h Mon Mar  6 23:02:58 2006
@@ -37,6 +37,7 @@
 void print_stock_row(const std::string& item, mysqlpp::longlong num,
                double weight, double price, const mysqlpp::Date& date);
 void print_stock_rows(mysqlpp::Result& res);
+void print_stock_table(mysqlpp::Query& query);
 void get_stock_table(mysqlpp::Query& query, mysqlpp::Result& res);
 bool connect_to_db(int argc, char *argv[], mysqlpp::Connection& con,
                const char* kdb = 0);


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to