cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark S. Kent" <mark.k...@vistyx.com>
Subject C1: ESQL handling single apostrophes
Date Fri, 28 Sep 2001 21:13:47 GMT
I have an XSP created string that I am passing to ESQL to create a dynamic
SQL string.  It worked fine until I added: "and some_date < 'today'" to the
WHERE clause (InterBase 6.0 format for the 'today' value).

I've tried this:
<page>
    <xsp:logic>
        String dynSQL = "select foo from bar where some_date = 'today' ";
    </xsp:logic>

    <esql:connection>
        <esql:pool>default</esql:pool>
        <esql:execute-query>
            <esql:query><xsp:expr>dynSQL</xsp:expr></esql:query>
            <esql:results>
                <esql:row-results>
                    <foodata><esql:get-string column="foo"/></foodata>
                </esql:row-results>
            </esql:results>
            </esql:query>
        </esql:execute-query>
    </esql:connection>
</page>

Other previous postings that others have used had something like this:
        String dynSQL = "select foo from bar where some_date = '" +
todayString + "' ";

but that's not working for me either...

Mark


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message