Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Custom articles panel (error)

Asked Modified Viewed 1,967 times
J
Jay
J
Jay 10
  • Member, joined since
  • Contributed 170 posts on the community forums.
  • Started 57 threads in the forums
  • Started this discussions
asked
Member

G'day folks from down under.

Im having a minor issue with a custom articles panel, it keeps saying comment table does not exist.

Table 'domain_db256s78.comments' doesn't existTable

here is the code that im using

opentable("New Articles");
$result = dbquery("SELECT * FROM ".DB_PREFIX."articles ORDER BY article_datestamp DESC LIMIT 0,10");
$max_chars = 65; // The maximum number of characters to show in each article title

echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
while ($data = dbarray($result)) {
$title = $data['article_subject'];
$sh_title = $title;
$a_id = $data['article_id'];
$v_id = $data['article_reads'];
$comments_a = dbcount("(comment_id)", "comments", "comment_type='A' AND comment_item_id=$a_id");
$date = $data['article_datestamp'];
$a_date = showdate("%d-%m-%Y", $date);
echo "<tr><td class='tbl' style='border-top:1px #ccc dotted;'> <img src='".THEME."images/bullet.gif' alt=''> $a_date | <a href='".BASEDIR."readarticle.php?article_id=".$data['article_id']."' title='".$data['article_subject']."' class='side'>".trimlink($data['article_subject'], $max_chars)."</a> [$v_id Views]</td></tr>\n";

}
echo "<tr><td align='center' class='tbl' style='border-top:1px #ccc dotted;'><a href='".BASEDIR."articles.php'>All Articles</a></td></tr>\n";
echo "</table>\n";
closetable();
0 replies

1 post

J
Jay
J
Jay 10
  • Member, joined since
  • Contributed 170 posts on the community forums.
  • Started 57 threads in the forums
  • Started this discussions
answered
Member

Thank You Very Much.
0 replies

Category Forum

Panels and Infusions

Labels

None yet

Statistics

  • Views 0 views
  • Posts 1 post
  • Votes 0 votes
  • Topic users 1 member

1 participant

J
J
Jay 10
  • Member, joined since
  • Contributed 170 posts on the community forums.
  • Started 57 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet