Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.0
Author Message
jaded
Theme Guru



Joined: Nov 01, 2003
Posts: 1006

PostPosted: Wed Jan 28, 2009 8:11 pm Reply with quote

Hello,

Today I relocated a client's website from one server to another. She currently has a nuke 7.0 website. I will be upgrading her to RN in a few days however, I need this issue sorted sooner.

The topics module does not work after the move. It did prior to the change.

The module only shows this text, currently.

Code:
...There aren't any news yet for this topic...


It does not work at all.

Any suggestions would be much appreciated.

Error reporting is on and no errors are revealed.

Thank you in advance. Razz

_________________
Themes BB Skins
http://www.jaded-designs.com
Graphic Tees
http://www.cafepress.com/jadeddesigns
Paranormal Tees
http://www.cafepress.com/HauntedTees
Ghost Stories & More
http://www.hauntingtales.net 
View user's profile Send private message Visit poster's website
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Wed Jan 28, 2009 10:32 pm Reply with quote

Pretty sure its the issue with MySQL and usage of "reads" in the SQL statement.
If you quote it in single quotes, so MySQL uses it as a string, (or just change the name) it should be fine.

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
jaded







PostPosted: Wed Jan 28, 2009 11:00 pm Reply with quote

Not to sound dense, but where exactly would I make this change? Which table in the database? I do not see "reads" anywhere offhand. Thank you again.

I noticed in the index.php for this there are references to "read" such as

Code:
$sql = "SELECT t.topicid, t.topicimage, t.topictext, count(s.sid) AS stories, SUM(s.counter) AS reads FROM ".$prefix."_topics t LEFT JOIN ".$prefix."_stories s ON (s.topic = t.topicid) GROUP BY t.topicid, t.topicimage, t.topictext ORDER BY t.topictext";

$result = $db->sql_query($sql);


Do you know why it would have worked on the old server and not the new one? What could have changed in the module in that short time?
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Fri Jan 30, 2009 6:41 am Reply with quote

Try this:

Code:


$sql = "SELECT t.topicid, t.topicimage, t.topictext, count(s.sid) AS stories, SUM(s.counter) AS 'reads' FROM ".$prefix."_topics t LEFT JOIN ".$prefix."_stories s ON (s.topic = t.topicid) GROUP BY t.topicid, t.topicimage, t.topictext ORDER BY t.topictext";
$result = $db->sql_query($sql);


"reads" is right before the FROM...

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
montego







PostPosted: Fri Jan 30, 2009 6:43 am Reply with quote

Oh, and the issue is most likely just a different MySQL version and/or configuration. (Sorry, didn't have time to look it up, but certain it is related just to that.)
 
jaded







PostPosted: Fri Jan 30, 2009 6:48 am Reply with quote

Thank you, Montego. That fixed it.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.0

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©