SEO-Board: Free, Fast and Search Engine Optimization Friendly Forum Script
»User: »Password:   Remember Me? 
SEO-Board Forum Software Community / General / Support / The content of comments is not loaded from db
Posted:  03 Jul 2006 21:23
Hi,
I am using seo-board.com for several months without any problem.

I deleted a lot of spam comments today and suddenly the content of comments is not loaded and I receive this message:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /data/web/virtuals/cell-phone-viruses.com/www/forum/vtopic.php on line 194

So, the page looks like this.

Do you know, what may cause this problem?

Thanks
Posted:  03 Jul 2006 23:23
That's strange.
Let's see if there's a MySQL error.
Modify the line as follows. From:

Code:

  $result = mysql_query("SELECT p.post_id, p.post_author, p.post_author_id, p.post_author_ip, p.post_text, p.post_text_status, p.post_time, p.post_edited, p.post_edited_by, p.post_edited_time, u.user_numposts, u.user_regdate, u.user_allowviewonline, u.user_lasttimereadpost FROM {$dbpref}posts p LEFT JOIN {$dbpref}users u ON p.post_author_id=u.user_id WHERE p.topic_id='$t' ORDER BY post_time LIMIT $startfrom,$postsperpage");

to
Code:

  $result = mysql_query("SELECT p.post_id, p.post_author, p.post_author_id, p.post_author_ip, p.post_text, p.post_text_status, p.post_time, p.post_edited, p.post_edited_by, p.post_edited_time, u.user_numposts, u.user_regdate, u.user_allowviewonline, u.user_lasttimereadpost FROM {$dbpref}posts p LEFT JOIN {$dbpref}users u ON p.post_author_id=u.user_id WHERE p.topic_id='$t' ORDER BY post_time LIMIT $startfrom,$postsperpage") or die(mysql_error());
you add the or (die(mysql_error())

Next, go to phpMyAdmin in your control panel and see if the seo_board_posts table has the posts in it.

Have you made changes to the code?
__________________
Are you looking for an SEO Consultant?
Email me: hristo at seo-board dot com
Posted:  04 Jul 2006 00:11
Quote:
Have you made changes to the code?

no

Quote:
Next, go to phpMyAdmin in your control panel and see if the seo_board_posts table has the posts in it.


phpMyAdmin says for this table:

#1016 - Can't open file: 'a_seo_board_posts.MYI' (errno: 145)

So, I deleted the table, used backuped one and it works OK.

Thanks for your time.