List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:June 20 2007 12:15pm
Subject:Re: Quoting mis-understanding
View as plain text  
tazatek wrote:
> I load data from a CSV file into a table.
> The fields are unquoted.  I then read back parts of this table to create a
> new table.

You need to separate these two issues.  I doubt the problem is really 
because you're both using CSV imports and having quoting issues.  It's 
one or the other.  Find out which.

>              // notice the required backticks 
> 	      q << "`" << << "` varchar(" <<
> << ") NOT NULL

Why fight with manual quoting when MySQL++ can do it for you?

	q << mysqlpp::quote << << ....

"quote" might not be the right manipulator for your situation.  There 
are several other related manipulators:

Once you figure out which one is correct, you can just start using it 
reflexively instead of memorizing quoting rules.
Quoting mis-understandingtazatek19 Jun
  • Re: Quoting mis-understandingWarren Young20 Jun