List:MySQL++« Previous MessageNext Message »
From:Steven Van Ingelgem Date:July 14 2007 5:50pm
Subject:Weird parsing of templated query
View as plain text  
Hi,


I am trying to figure out why the following is happening:

query << "SELECT COUNT(*) FROM Category WHERE name=%0q;";
query.parse();
query.def[ 0 ] = "testing";
query.store();

=> The MySQL server now receives:

SELECT COUNT(*) FROM Category WHERE name='SELECT COUNT(*) FROM Category
WHERE name=\'test\'';


How could this be? Am I doing something wrong here? It's also ONLY if I have
1 templated parameter...


Greetz,
Steven

Thread
Weird parsing of templated querySteven Van Ingelgem14 Jul
  • Re: Weird parsing of templated queryAndrew Sayers14 Jul
  • Re: Weird parsing of templated queryWarren Young16 Jul
    • Re: Weird parsing of templated querySteven Van Ingelgem16 Jul
      • Re: Weird parsing of templated queryWarren Young16 Jul
        • Re: Weird parsing of templated querySteven Van Ingelgem16 Jul
          • Re: Weird parsing of templated queryWarren Young16 Jul
            • Re: Weird parsing of templated querySteven Van Ingelgem16 Jul
              • Re: Weird parsing of templated queryWarren Young16 Jul
                • Re: Weird parsing of templated querySteven Van Ingelgem16 Jul
Re: Weird parsing of templated queryroberto previdi16 Jul
  • Re: Weird parsing of templated queryWarren Young16 Jul
Re: Weird parsing of templated queryroberto previdi16 Jul