phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Split and Merge in One Step MOD not working anymore.


 
Search this topic... | Search MOD Requests... | Search Box
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Author Message
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Sat Jun 12, 2010 10:00 am 
Post subject: Split and Merge in One Step MOD not working anymore.

Whenever I try to merge posts from a topic to another topic, I get this error:
Code:
Could not update user topic count information

DEBUG MODE

SQL Error : 1064 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 '' at line 3

UPDATE phpbb_users SET user_topics = user_topics + 1 WHERE user_id =

Line : 1108
File : modcp.php

The MOD was installed long ago and it was working fine. Can't really tell what happened in the mean time. It seems that it can not update post count.

The MOD I'm using is this.

_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 414
Location: Québec


flag
PostPosted: Sat Jun 12, 2010 4:00 pm 
Post subject: Re: Split and Merge in One Step MOD not working anymore.

I can't find anything that looks like that query in the MOD. Can you post your code around that line? Maybe your host updated their SQL version and some part of the syntax is not accepted anymore.
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Sun Jun 13, 2010 11:02 am 
Post subject: Re: Split and Merge in One Step MOD not working anymore.

Code:
Line 1102 - // Topics a user has started MOD, By Manipe (Begin)
Line 1103 -             $sql = "UPDATE " . USERS_TABLE . "
Line 1104 -                SET user_topics = user_topics + 1
Line 1105 -                WHERE user_id = $first_poster";
Line 1106 -             if (!($db->sql_query($sql)))
Line 1107 -             {
Line 1108 -                message_die(GENERAL_ERROR, 'Could not update user topic count information', '', __LINE__, __FILE__, $sql);
Line 1109 -             }
Line 1110 - // Topics a user has started MOD, By Manipe (End)

I also have both MODs (Split and Merge and Topic a user has started) on another board (where I have almost same MODs) and there it is working just fine. I just tested it. icon_confused.gif

I also have to mention that both forums are hosted on the same server, so it has to be same PHP and MySQL version.
I've tryed on the version installed on my computer (using XAMPP) and it gives the same error. It means the error is either in the database or in the files.

_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 414
Location: Québec


flag
PostPosted: Sun Jun 13, 2010 5:16 pm 
Post subject: Re: Split and Merge in One Step MOD not working anymore.

I think you should check what value $first_poster returns. Have you tested with multiple users?
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Sun Jun 13, 2010 5:57 pm 
Post subject: Re: Split and Merge in One Step MOD not working anymore.

$first_poster is to check if the moved message is the first in the page, because if it is, the user must have -1 from the topics count. and if in the new created topic he becomes the creator, he must receive +1.
At first, I've tryed to move multiple messages. Then, only one. Then only one message BUT not the first one to be moved in a topic where it is not becoming the first one. So I was expecting to not have anything to do with checking first poster... But still, same error. icon_sad.gif

I hear stuff about this so-called SQL manual. I would like to put my hands on it, to see details about 1064 error. Does anyone know where to find SQL manual?

_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 414
Location: Québec


flag
PostPosted: Sun Jun 13, 2010 7:12 pm 
Post subject: Re: Split and Merge in One Step MOD not working anymore.

What I meant is check the value that the variable "contains". It might be empty, which would screw your query.

MySQL manual: http://dev.mysql.com/doc/
Back to top
Display posts from previous:   
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0100 seconds using 15 queries. (SQL 0.0023 Parse 0.0002 Other 0.0074)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo