logo       
Google Custom Search
    AddThis Social Bookmark Button

Weird parsing of templated query: msg#00070

Subject: Weird parsing of templated query
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

Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>