Author: wyoung
Date: Sat Mar 17 05:20:24 2007
New Revision: 1446

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1446&view=rev
Log:
Previous fix to template query processing for 1 parameter broke down for
multiple parameters.  Now it works for all parameter counts.

Modified:
    trunk/lib/query.cpp

Modified: trunk/lib/query.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/query.cpp?rev=1446&r1=1445&r2=1446&view=diff
==============================================================================
--- trunk/lib/query.cpp (original)
+++ trunk/lib/query.cpp Sat Mar 17 05:20:24 2007
@@ -108,7 +108,7 @@
 ResNSel
 Query::execute(const SQLString& str)
 {
-       if (!parse_elems_.empty() && !def.processing_) {
+       if ((parse_elems_.size() == 2) && !def.processing_) {
                // We're a template query and we haven't gone through this path
                // before, so take str to be a lone parameter for the query.
                // We will come back through this function with a completed
@@ -407,7 +407,7 @@
 Result 
 Query::store(const SQLString& str)
 {
-       if (!parse_elems_.empty() && !def.processing_) {
+       if ((parse_elems_.size() == 2) && !def.processing_) {
                // We're a template query and we haven't gone through this path
                // before, so take str to be a lone parameter for the query.
                // We will come back through this function with a completed
@@ -578,7 +578,7 @@
 ResUse
 Query::use(const SQLString& str)
 {
-       if (!parse_elems_.empty() && !def.processing_) {
+       if ((parse_elems_.size() == 2) && !def.processing_) {
                // We're a template query and we haven't gone through this path
                // before, so take str to be a lone parameter for the query.
                // We will come back through this function with a completed


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

Reply via email to