SPUG: BD::mysql::st execute failed:

luis medrano lmzaldivar at gmail.com
Tue Sep 19 10:20:17 PDT 2006

Hey List,

I have a problem I'm trying to run this piece of code inserting values to a
row in a mysql database where "post_content" is type longtext:

        my $sth1=$dbh->prepare("INSERT INTO wp_posts(post_author, post_date,
post_date_gmt, p
ost_content,post_title, post_status, comment_status, ping_status,post_name,
post_modified, po

t','$guid')")  or die; # "Couldnt prepare statement: " . dbh->errstr;
        my $rv1 = $sth1->execute();

But I'm trying to insert text file to post_content and showing this error
when I ran the script:

BD::mysql::st execute failed: You have an error in your SQL syntax; check
manual that corresponds to your MySQL server version for the right syntax to
use near 't know what a CHM file isNULL Just think of the Help program that
comes up when ' at line 2 at posting.pl line 75.

But if replace the text file for a string on @post_content I have no error
running the script. Any ideas or suggestions of what I'm doing wrong?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/spug-list/attachments/20060919/3148d2a5/attachment.html 

More information about the spug-list mailing list