List:MySQL++« Previous MessageNext Message »
From:Florian Feldbauer Date:October 25 2010 8:09pm
Subject:Re: Problems with storein and template queries
View as plain text  
On Mon, 25 Oct 2010, Warren Young wrote:

> 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.
>

Ok, I changed the query template to
   mysqlpp::Query query = conn.query("SELECT * FROM %0q WHERE col0 = %1q");
also swapped the parameters in the storein call, but I still have this 
problem.
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