Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
ccartemis
New Member
New Member



Joined: Jul 18, 2005
Posts: 15

PostPosted: Mon Jul 18, 2005 2:31 pm Reply with quote

I'm getting the error below when I try to add a new Topic to the Topic module.

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/httpd/[hostinfo remove for security]/httpdocs/includes/sql_layer.php on line 299

and it's not adding the topic either.


I'm using phpnuke platinum 7.6 Smile


Any help would greatly be appreciated!

Cheers
 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Mon Jul 18, 2005 5:00 pm Reply with quote

Are you able to do anything else (post news, change passwords, etc) that involves the database?

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
ccartemis







PostPosted: Mon Jul 18, 2005 5:07 pm Reply with quote

Yes I'm able do everything else without problem or error.
 
kguske







PostPosted: Mon Jul 18, 2005 5:12 pm Reply with quote

Good - it can connect to the database. Were there any changes to the topics function?
 
ccartemis







PostPosted: Mon Jul 18, 2005 5:15 pm Reply with quote

Only when I went from phpnuke 7.6 to platinum.

I tried uploading the Topic admin files again to see if it was an error in the code somewhere, but that didn't work either, same error message.

I'm at a loss..lol, but my topic module is pretty important for the site, and it's not completed...very frustrating.

Bang Head
 
ccartemis







PostPosted: Mon Jul 18, 2005 5:17 pm Reply with quote

If I remember correctly it was not working before the platinum install, I was hoping that would fix it.

I've been everywhere it seems to find an answer for this, but haven't been able to find a solution.
 
kguske







PostPosted: Mon Jul 18, 2005 5:22 pm Reply with quote

Check to see if the topics table exists in your database.
 
ccartemis







PostPosted: Mon Jul 18, 2005 6:05 pm Reply with quote

Yes, Topic tables exist.
 
kguske







PostPosted: Mon Jul 18, 2005 6:27 pm Reply with quote

Then it must be a problem with the structure of the topics table. Compare the structure of the topics table with the create table in the sql that came with NukePlatinum.
 
ccartemis







PostPosted: Mon Jul 18, 2005 6:41 pm Reply with quote

Here's what is in my platinum sql

topicid int(3) NOT NULL auto_increment,
topicname varchar(20),
topicimage varchar(20),
topictext varchar(40),
counter int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (topicid),
KEY topicid (topicid)


Here's the tables I have currently in my database

all the above except Primary and Key and the following below:

displayorder
displayhome


I don't know too much about databases.
 
kguske







PostPosted: Mon Jul 18, 2005 7:16 pm Reply with quote

It looks like you had some other modification to the topics function before moving to Platinum. You might consider dropping or renaming the nuke_topics table and recreating it with this SQL from the platinum.sql file:
Code:
CREATE TABLE nuke_topics (

   topicid int(3) NOT NULL auto_increment,
   topicname varchar(20),
   topicimage varchar(20),
   topictext varchar(40),
   counter int(11) DEFAULT '0' NOT NULL,
   PRIMARY KEY (topicid),
   KEY topicid (topicid)
);

#
# Dumping data for table 'nuke_topics'
#

INSERT INTO nuke_topics VALUES ('2', 'Addons', 'Addons.gif', 'Addons', '0');
INSERT INTO nuke_topics VALUES ('4', 'Blocks', 'Blocks.gif', 'Blocks', '0');
INSERT INTO nuke_topics VALUES ('5', 'Calendar', 'Calendar.gif', 'Calendar', '0');
INSERT INTO nuke_topics VALUES ('6', 'Community', 'Community.gif', 'Community', '0');
INSERT INTO nuke_topics VALUES ('7', 'Files', 'Files.gif', 'Files', '0');
INSERT INTO nuke_topics VALUES ('8', 'Hosting', 'Hosting.gif', 'Hosting', '0');
INSERT INTO nuke_topics VALUES ('9', 'Information', 'Information.gif', 'Information', '0');
INSERT INTO nuke_topics VALUES ('10', 'Language', 'Language.gif', 'Language', '0');
INSERT INTO nuke_topics VALUES ('11', 'Modules', 'Modules.gif', 'Modules', '0');
INSERT INTO nuke_topics VALUES ('12', 'News', 'News.gif', 'News', '0');
INSERT INTO nuke_topics VALUES ('13', 'Security', 'Security.gif', 'Security', '0');
INSERT INTO nuke_topics VALUES ('14', 'Server', 'Server.gif', 'Server', '0');
 
kguske







PostPosted: Mon Jul 18, 2005 7:20 pm Reply with quote

The primary key and key functions tell MySQL how to sequence or index the table (using the topicid attribute), so they won't appear in the structure of the table. The displayorder and displayhome were likely added in some other customization or addon. What version or distribution were you using prior to Platinum?
 
ccartemis







PostPosted: Mon Jul 18, 2005 7:39 pm Reply with quote

phpnuke 7.6, but I might of at some point modified the topics table...I've done quite a few hacks in the past few years.


If I do the above will I lose any information like news stories or topics?
 
kguske







PostPosted: Mon Jul 18, 2005 7:52 pm Reply with quote

If you drop the topics table as suggested above, you'll lose the topics, but not the news. However, this will cause a problem for the news as it will have incorrect topic ids in the stories table.

A better idea: export the topics table, save it as a text file. Then, simply remove / delete the two extra fields (displayorder, displayhome) using phpMyAdmin. A quick way to do that (after backing up the table, of course) is to use this SQL command:
Code:
ALTER TABLE `nuke_topics` DROP `displayorder` , DROP `displayhome` ;

 
ccartemis







PostPosted: Mon Jul 18, 2005 8:33 pm Reply with quote

It worked I can add topics now Smile Thank you soooo much.


but I'm still getting this error at the top of the page Sad

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/httpd/PLEASEDONOTPOSTYOURPATH/includes/sql_layer.php on line 299
 
kguske







PostPosted: Mon Jul 18, 2005 9:04 pm Reply with quote

Which page? Topics administration or the topics module?
 
ccartemis







PostPosted: Tue Jul 19, 2005 2:22 am Reply with quote

topics admin Smile


Now when I go view my topics and click More to view the rest of the articles in that topic, it takes me to the homepage instead.
 
ccartemis







PostPosted: Tue Jul 26, 2005 10:34 am Reply with quote

Does anyone have a solution?

When I click More on my News Topics, it just takes me to the homepage.
 
ccartemis







PostPosted: Fri Aug 12, 2005 4:27 pm Reply with quote

I still haven't found a solution to this problem..

I'm still getting redirected to the homepage when I click 'More' in my News Topics.


Sad
 
kguske







PostPosted: Mon Aug 22, 2005 5:13 am Reply with quote

Did you resolve this? If now, what is in the link before you click? What theme are you using? What version / nuke distribution? Any news addons, tweaks, enhancements?
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

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 ©