Search Postgresql Archives

Re: How to escape apostrophes when apostrophes already used to escape something else

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stefan Schwarzer wrote:
> probably not too complicated, but although googling my way through  
> many pages, I don't find the solution.
> 
> I have a query which uses already an apostrophe to escape something  
> else:
> 
> $query = "SELECT
> 			*
> 		FROM
> 			crosstab('SELECT
[...]
> 						(c.name = ''Cote
d'Ivoire'' )
> 					ORDER BY
> 						1,2;', 3) AS ct(name
varchar, y_1960 numeric)
> 
> Now, "Cote d'Ivoire" needs to be escaped too. But how can I achieve  
> this?

In your case, by using ''Cote d''''Ivoire''.

Yours,
Laurenz Albe

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux