Author |
Message |
ccartemis
New Member


Joined: Jul 18, 2005
Posts: 15
|
Posted:
Mon Jul 18, 2005 2:31 pm |
|
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
Any help would greatly be appreciated!
 |
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Mon Jul 18, 2005 5:00 pm |
|
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! |
|
|
 |
ccartemis

|
Posted:
Mon Jul 18, 2005 5:07 pm |
|
Yes I'm able do everything else without problem or error. |
|
|
|
 |
kguske

|
Posted:
Mon Jul 18, 2005 5:12 pm |
|
Good - it can connect to the database. Were there any changes to the topics function? |
|
|
|
 |
ccartemis

|
Posted:
Mon Jul 18, 2005 5:15 pm |
|
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.
 |
|
|
|
 |
ccartemis

|
Posted:
Mon Jul 18, 2005 5:17 pm |
|
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

|
Posted:
Mon Jul 18, 2005 5:22 pm |
|
Check to see if the topics table exists in your database. |
|
|
|
 |
ccartemis

|
Posted:
Mon Jul 18, 2005 6:05 pm |
|
|
|
 |
kguske

|
Posted:
Mon Jul 18, 2005 6:27 pm |
|
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

|
Posted:
Mon Jul 18, 2005 6:41 pm |
|
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

|
Posted:
Mon Jul 18, 2005 7:16 pm |
|
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

|
Posted:
Mon Jul 18, 2005 7:20 pm |
|
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

|
Posted:
Mon Jul 18, 2005 7:39 pm |
|
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

|
Posted:
Mon Jul 18, 2005 7:52 pm |
|
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

|
Posted:
Mon Jul 18, 2005 8:33 pm |
|
It worked I can add topics now Thank you soooo much.
but I'm still getting this error at the top of the page
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

|
Posted:
Mon Jul 18, 2005 9:04 pm |
|
Which page? Topics administration or the topics module? |
|
|
|
 |
ccartemis

|
Posted:
Tue Jul 19, 2005 2:22 am |
|
topics admin
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

|
Posted:
Tue Jul 26, 2005 10:34 am |
|
Does anyone have a solution?
When I click More on my News Topics, it just takes me to the homepage. |
|
|
|
 |
ccartemis

|
Posted:
Fri Aug 12, 2005 4:27 pm |
|
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.
 |
|
|
|
 |
kguske

|
Posted:
Mon Aug 22, 2005 5:13 am |
|
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? |
|
|
|
 |
|