Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Kodo taisymas

Parašė Dandžu· 2008 Rugp. 3 12:08:55
#1

Tai vat turiu tokį kodą pasidaręs jog rodytų 10 naujausių phpBB forumo pranešimų ir štai kas atsitiko. Tos temos kartojasi. Kiek žiūrėjau kodas lyg ir geras, bet kame bėda taip ir nesuradau.
<?php

$result = dbquery("SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, t.topic_replies, t.topic_type, f.forum_posts, f.forum_name, f.forum_last_post_id, f.forum_id, f.forum_status, f.forum_order, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
                FROM prefix_topics AS t, prefix_forums AS f, prefix_posts AS p, forum1iuka5_users AS u
                WHERE t.forum_id  ORDER BY p.post_id DESC LIMIT 0,10");

if (dbrows($result) != 0) {

echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
while ($data = dbarray($result)) {
echo "<tr>\n";
echo "<td width='45%' class='tbl2'><span class='small'>".$data['forum_name']."</span></td>
<td width='55%' class='tbl2'><span class='small'><a href='forumas/viewtopic.php?p=".$data['topic_last_post_id']."#".$data['topic_last_post_id']."' title=''>".trimlink($data['topic_title'], 30)."</a></span></td>\n";
echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><span class='small'>".($data['topic_replies'])."</span></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><span class='small'><a href='forumas/profile.php?mode=viewprofile&amp;u=".$data['poster_id']."'>".$data['username']."</a></span></td>
<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><span class='small'>".showdate("forumdate", $data['post_time'])."</span></td>
</tr>\n";
}
echo "</table>\n";

}
?>



Redagavo Dandžu· 2008 Rugp. 3 12:08:41