<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Special Character problem when importing entires into new table</title>
		<link>https://legacy.forums.gravityhelp.com/topic/special-character-problem-when-importing-entires-into-new-table</link>
		<description>Gravity Support Forums Topic: Special Character problem when importing entires into new table</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 12:04:46 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/special-character-problem-when-importing-entires-into-new-table" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Special Character problem when importing entires into new table"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/special-character-problem-when-importing-entires-into-new-table#post-99598</link>
			<pubDate>Thu, 06 Dec 2012 09:25:39 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">99598@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You're welcome.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>byork on "Special Character problem when importing entires into new table"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/special-character-problem-when-importing-entires-into-new-table#post-98745</link>
			<pubDate>Tue, 04 Dec 2012 09:14:15 +0000</pubDate>
			<dc:creator>byork</dc:creator>
			<guid isPermaLink="false">98745@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;That's exactly it! Thank you so much. Perfect answer for what I was looking for.&#60;br /&#62;
Thank you!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Special Character problem when importing entires into new table"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/special-character-problem-when-importing-entires-into-new-table#post-98468</link>
			<pubDate>Mon, 03 Dec 2012 19:33:47 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">98468@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This is an issue with your own code rather than the Gravity Forms export routine?&#60;/p&#62;
&#60;p&#62;To escape values before inserting them, if they may have apostrophes or single quotes, you can use the PHP function &#60;strong&#62;mysql_real_escape_string&#60;/strong&#62;.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://php.net/manual/en/function.mysql-real-escape-string.php&#34; rel=&#34;nofollow&#34;&#62;http://php.net/manual/en/function.mysql-real-escape-string.php&#60;/a&#62;  &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
$firstname = mysql_real_escape_string($entry[&#38;#39;2.3&#38;#39;]);
$lastname = mysql_real_escape_string($entry[&#38;#39;2.6&#38;#39;]);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;You might need to do that with more fields, but that is basically how to do it.  Not related to Gravity Forms at all, just PHP and MySQL.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>byork on "Special Character problem when importing entires into new table"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/special-character-problem-when-importing-entires-into-new-table#post-98448</link>
			<pubDate>Mon, 03 Dec 2012 17:29:58 +0000</pubDate>
			<dc:creator>byork</dc:creator>
			<guid isPermaLink="false">98448@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I am exporting the entry data into a table, trouble is, any entry that has an apostrophe in the name (O'Donnel) does not come thru. Error log showing name field as 'O'Connor'&#60;/p&#62;
&#60;p&#62;I assume that the apostrophe needs to be escaped - but I cannot figure how to do it. Would I do it in the hook in the functions.php file?:&#60;/p&#62;
&#60;p&#62;// Pulls gravity form entries into xml and outputs&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;#39;gform_after_submission_6&#38;#39;, &#38;#39;input_fields&#38;#39;, 8, 4);
function input_fields($entry, $form){
global $wpdb;

    $promocode = $entry[&#38;#39;7&#38;#39;];
    $conferenceid = $entry[&#38;#39;6&#38;#39;];
    $conferencechoice = $entry[&#38;#39;1&#38;#39;];
    $firstname = $entry[&#38;#39;2.3&#38;#39;];
    $lastname = $entry[&#38;#39;2.6&#38;#39;];
    $phone = $entry[&#38;#39;3&#38;#39;];
    $email = $entry[&#38;#39;4&#38;#39;];
    $optinternal = $entry[&#38;#39;5.1&#38;#39;];
    $optexternal = $entry[&#38;#39;5.2&#38;#39;];

  $SQL = &#38;quot;INSERT INTO fsleads ( userid, promocode, conferenceid, conferencechoice, firstname, lastname, phone, email, optinternal, optexternal, uploaded ) VALUES ( &#38;#39;&#38;#39;, &#38;#39;$promocode&#38;#39;, &#38;#39;$conferenceid&#38;#39;, &#38;#39;$conferencechoice&#38;#39;, &#38;#39;$firstname&#38;#39;, &#38;#39;$lastname&#38;#39;, &#38;#39;$phone&#38;#39;, &#38;#39;$email&#38;#39;, &#38;#39;$optinternal&#38;#39;, &#38;#39;$optexternal&#38;#39; , &#38;#39;N&#38;#39; )&#38;quot;;
  $wpdb-&#38;gt;query($SQL);&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
