From: Warren Young Date: April 23 2007 1:29pm Subject: Re: NULL in templatized queries List-Archive: http://lists.mysql.com/plusplus/6553 Message-Id: <462CB4B4.4080801@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Michael Hanselmann wrote: > Index: lib/sql_string.h Thanks for the patch! It's applied now. > Index: examples/tquery.cpp > =================================================================== > --- examples/tquery.cpp (revision 1526) > +++ examples/tquery.cpp (working copy) > @@ -44,9 +44,15 @@ > // Build a template query to retrieve a stock item given by > // item name. > mysqlpp::Query query = con.query(); > - query << "select * from stock where item = %0q"; > + query << "select * from stock where item = %0q:item"; > query.parse(); > > + query.def["item"] = mysqlpp::null; > + std::cout << query.str() << std::endl; > + > + query.def["item"] = mysqlpp::SQLString("foo"); > + std::cout << query.str() << std::endl; > + > // Retrieve an item added by resetdb; it won't be there if > // tquery or custom3 is run since resetdb. > mysqlpp::Result res1 = query.store("Nürnberger Brats"); Errr...I'm surprised you think I'd accept this, given my previous comments on this. Thanks for trying to update the examples anyway, but I won't exhibit unsupported "features" in the examples.