List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:February 12 2008 3:47pm
Subject:Re: How to use mysqlpp::quote?
View as plain text  
Noud de Beijer wrote:
> 
> I'm 
> confused 
> about 
> how 
> to 
> use 
> the 
> mysqlpp::quote 
> manipulator. 

...and also the line break feature in your email client, apparently.

> it 
> doesn't 
> place 
> backticks 
> around 
> "stock 
> 0" 
> but 
> single 
> quotes.

The only way for the quote manipulator to be smart enough to choose 
which quoting style to use based on context would be to add a full SQL 
query parser to MySQL++.  Since that would be an unreasonable use of 
programmer time, the rule is very simple: mysqlpp::quote single-quotes 
items.  It's used for quoting values in queries, not column or table names.

I've added an item to the Wishlist for a backtick manipulator.  In the 
meantime, you can add them easily enough by hand.
Thread
How to use mysqlpp::quote?Noud de Beijer12 Feb
  • Re: How to use mysqlpp::quote?Warren Young12 Feb
Re: How to use mysqlpp::quote?Noud de Beijer12 Feb
  • Re: How to use mysqlpp::quote?Warren Young12 Feb