On these pages are my WordPress plugins, the odd article and my Support Forum.

For my random rantings on everything else please visit my blog at Yellow Swordfish

WP Plugins


Articles

If you find any of my plugins useful, please comsider a donation towards my running costs.

Thank you

Current User: Guest
Please consider registering

 
Search Forums:


 




WordPress database error after migration from 2.0 to 3.1.2

UserPost

8:48 am
18 Jun 2008


Pavel

Guest

 
1

I have migrated forum from version 2.0 to 3.1.2

When member or guest enter to forum, they got an error:

WordPress database error: [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 'AND post_index = OR topic_id = AND post_index=1 ORDER BY post_id DESC' at line 6]
SELECT post_id, topic_id, forum_id, post_date, UNIX_TIMESTAMP(post_date) as udate, guest_name, wp_sfposts.user_id, post_index, post_status, user_login, wp_sfmembers.display_name FROM wp_sfposts LEFT JOIN wp_users ON wp_sfposts.user_id = wp_users.ID LEFT JOIN wp_sfmembers ON wp_sfposts.user_id = wp_sfmembers.user_id WHERE topic_id = AND post_index = OR topic_id = AND post_index=1 ORDER BY post_id DESC;

WordPress database error: [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 'AND user_id=166' at line 4]
SELECT user_id FROM wp_sfposts WHERE topic_id= AND user_id=166

Forum works fine, but I don't know how to avoid this message. If I logon as administrator I don't see this error.

9:45 am
18 Jun 2008


Pavel

Guest

 
2

I have noticed that if you go direct to post from sidebar this error doesn't appear. But if you go direct to forum link the error is exist.

7:26 am
20 Jun 2008


Pavel

Guest

 
3

Still have a problem

2:51 pm
20 Jun 2008


Mr Papa

Moderator

Arizona, USA

posts 1452

 
4

sorry, somehow I missed this topic…

As a guest, I do not see those errors on your forum site… so are you as admin and members still seeing the error?

this sounds vaguely familiar, but cant recall the details…  at work at the moment, will look through the forums tonight when I get home, but did you search the support forum here?

if the issue still exists, perhaps you could create me a test account to investigate further tonight…  please pm me the details here…

3:22 am
25 Jun 2008


Steven Hrisak

Guest

 
5

Pavel said:

Still have a problem


I encountered this problem tonight and realized what caused it.  I deleted a posting that I did not like when I was logged in as Admin.  This happened to be the last posting that was made in that particular topic.  The table that holds the topics wp_sftopics, did not revert back to the previous post_id.  post_id in the wp_sftopics table should contain the last post_id for each topic.  So, you can find out what the last post_id was for each topic by going into the wp_sfposts table and typically going to the bottom of the list.  However; I would recommend sorting by post_id so that you make sure you are viewing the last postings.  The last post_id for each topic must match with the post_id listed in the wp_sftopics for each topic.  I also had to change the post_id listed in wp_sfforums for that particular forum.  I hope this helps!

By the way, I love this forum plugin!!

Here is my website:  http://www.2012comet.com

I have the forum up and running with over 750 postings.  I will be making a donation soon, probably within the next few days.  You guys have been great!

Steve

7:26 am
25 Jun 2008


Mr Papa

Moderator

Arizona, USA

posts 1452

 
6

that shouldnt happen… havent noticed it before… still will log a ticket to make sure we investigate further…



Reply to Topic: WordPress database error after migration from 2.0 to 3.1.2

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 1 + 7        (Required)

Topic Reply:


 
 

About the Stuff at Yellow Swordfish forum

Currently Online:

derixc

12 Guests

Maximum Online: 71

Forums:

Groups: 3

Forums: 16

Topics: 1954

Posts: 13264

Members:

There are 927 members

There are 800 guests


Yellow Swordfish has made 5050 posts

Top Posters:

Mr Papa - 1452

-Radio- - 521

ovizii - 106

jfv - 82

angelic007 - 70

Administrator: Yellow Swordfish | Moderators: Yellow Swordfish, Mr Papa, -Radio-


© Simple:Press Forum - Version 3.1.4 (Build 357)