We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

SQL error message when posting a weblog entry

Development and Programming

craiguffman's avatar
craiguffman
100 posts
16 years ago
craiguffman's avatar craiguffman

I continue to have an unresolved problem when posting. Each time I post to my primary weblog, I get the following error message:

MySQL ERROR: Error Number: 1064 Description: 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 ‘http://mysite_path/test_11_of_fill_forum_extension’ at line 1 Query: UPDATE exp_forum_topics SET title = ‘test 11 of fill forum extension again’, body = ‘test 10 of fill forum extension View the original post ’ WHERE topic_id = ‘26’

I am using Robin Sewell’s Automated Forum Filler extension that automatically creates a forum topic when a weblog entry is created. The extension seems to choke at the following line:

$_POST["forum_body"] = $IN->GBL('field_id_6', 'POST') . "\nView the <a href="http://{permalink}" title='View the original post in the blog'>original post</a>";

I have attached my version of the extension.

I can’t tell what’s wrong with the syntax. This is major stoppage for me. I’d appreciate some help in troubleshooting. Thanks! Craig

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
16 years ago
Ingmar Greil's avatar Ingmar Greil

What version and build of EE are you on? Does it work correctly with the extension disabled?

       
craiguffman's avatar
craiguffman
100 posts
16 years ago
craiguffman's avatar craiguffman

It works fine when I disable the extension.

I am running v1.66 Build: 20081114.

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
16 years ago
Ingmar Greil's avatar Ingmar Greil

Well, everything points to an error with that extension, then. Let me move this down to extensions.

       
craiguffman's avatar
craiguffman
100 posts
16 years ago
craiguffman's avatar craiguffman

I just commented out the code in line 37 (which I thought was the problem) and put back in the previously commented code. The old code works just fine. But it does not achieve my objective, which is include a back link to the weblog post. This is the code that does not produce the SQL error:

$_POST["forum_body"] = $IN->GBL('field_id_6', 'POST');

So the problem is with this one line in which I am trying to do a back link. Others on the fora have claimed success in doing this.

So this is the culprit evidently:

$_POST["forum_body"] = $IN->GBL('field_id_15', 'POST') . "\nView the <a href="http://{permalink}" title='View the original post in the blog'>original post</a>";
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.