ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Apostrophes break the query module

August 29, 2014 10:48am

Subscribe [1]
  • #1 / Aug 29, 2014 10:48am

    MID

    166 posts

    I am using the query module to display a custom profile field in my forum templates:

    {exp:query sql='SELECT occupation as orgname FROM exp_members WHERE screen_name="{author}";'}
    {if "{orgname}"!=""} {orgname}{/if}
    {/exp:query}


    If the screen name contains an apostophe, then this breaks, and the page fails to display.

    Is this a bug, or am I missing something here?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases