List,<br><br>I running this code feeding a database:<br>my $sth1=$dbh-&gt;prepare(&quot;INSERT INTO wp_posts(post_author, post_date, post_date_gmt, post_content,post_title, post_status, comment_status, ping_status,post_name, post_modified, post_modified_gmt,guid)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VALUES('$post_author','$post_date','$post_date_gmt','@post_content','$post_title','$post_status','$comment_status','$ping_status','$post_name','$post_modified','$post_modified_gmt','$guid')&quot;)&nbsp;&nbsp;or die; # &quot;Couldnt prepare statement: &quot; . dbh-&gt;errstr;
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my $rv1 = $sth1-&gt;execute();<br><br><br>but my problem is if any of the values of @post_content or $post_title contain apostrophe the script show this error not executing of feeding the database: <br><br>
DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's%20secret%20visits%20to%20heiress/article.do&quot;&gt;Goldsmith s secret visits to heir
<span style="background-color: rgb(255, 255, 0);">'</span> at line 2 at posting-news.pl<br><br>anybody knows how can I fix this without removing the apostrophe?<br><br>Thanks,<br>Luis<br>