Forum Moderators: open
I have the query actually building without issue, but the problem is that the quotes are messing up when the query fires.
My XSL file is as such:
<xsl:template match="IndexStoryHead">
INSERT INTO newsfeed VALUES (NULL,'<xsl:value-of select="(.)"/>',
</xsl:template>
<xsl:template match="Story">
'<xsl:value-of select="(.)"/>',0);
</xsl:template>
What is outputted is:
INSERT INTO newsfeed VALUES (NULL,'random news title', ' TORONTO - snippet description ',0);
What I need to happen is for the single and double quotes get escaped out in the query. How would I go about doing this?
TIA,
Phil
[edited by: jatar_k at 5:59 pm (utc) on June 19, 2006]
[edit reason] no specifics thanks [/edit]
INSERT INTO news VALUES (\'item\',\'bob\'s wife left him for you\'re friend\',0);
Instead of:
INSERT INTO news VALUES ('item','bob\'s wife left him for you\'re friend',0);