List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:October 25 2010 6:42pm
Subject:Re: Problems with storein and template queries
View as plain text  
On 10/25/2010 11:44 AM, Florian Feldbauer wrote:
> mysqlpp::Query query = conn.query("SELECT * FROM %1 WHERE col0 = %0q");

%1 should be %1q, in case you ever have a table name needing quotes.

Also, I'd swap 0 and 1 to make it easier to understand the code.  I 
spent an extra 30 seconds staring at this to make sure I was reading it 
correctly, that I hadn't transposed the parameters.  I don't see why 
you'd make all readers of your code pay a penalty like that.

It may be that those two things, which are really matters of style, fix 
your problem because they may cause a different storein() overload to be 
used.
Thread
Problems with storein and template queriesFlorian Feldbauer25 Oct
  • Re: Problems with storein and template queriesWarren Young25 Oct
    • Re: Problems with storein and template queriesFlorian Feldbauer25 Oct
      • Re: Problems with storein and template queriesWarren Young26 Oct
        • Re: Problems with storein and template queriesFlorian Feldbauer26 Oct
          • Re: Problems with storein and template queriesWarren Young26 Oct
            • Re: Problems with storein and template queriesWarren Young26 Oct
              • Re: Problems with storein and template queriesFlorian Feldbauer27 Oct
                • Re: Problems with storein and template queriesWarren Young3 Nov
  • Re: Problems with storein and template queriesAdrian Cornish25 Oct
    • Re: Problems with storein and template queriesWarren Young25 Oct