SQL syntax

3 posts by 2 authors in: Forums > CMS Builder
Last Post: July 28, 2010   (RSS)

By design9 - July 28, 2010

Can someone tell what syntax I would use for an apostrophe?

Here is my code:

list($allarticlesRecords, $articlesMetaData) = getRecords(array(
'tableName' => 'articles',
'where' => " category LIKE '%\tFather's Day\t%' ",
));

It is not working correctly because of the apostrophe in father's day.

Thanks!

April

Re: [apdance9] SQL syntax

By Donna - July 28, 2010

Hi April!

You can escape apostrophe's with a backslash, like this:

Father\'s Day

Give that a try and let me know if that works. :)
Donna

--
support@interactivetools.com