Parašė Noyz· 2011 Gru. 17 18:12:13
#1
Turiu kodą :
openside("Skriptai");
echo "<table><td height='70'>";
$result = dbquery(
"SELECT ta.*,tac.* FROM ".$db_prefix."articles ta
INNER JOIN ".$db_prefix."article_cats tac ON ta.article_cat=tac.article_cat_id
WHERE ".groupaccess('article_cat_access')." ORDER BY article_datestamp DESC LIMIT 0,77"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['article_subject'], 20);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."readarticle.php?article_id=".$data['article_id']."' title='".$data['article_subject']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
echo "</td></tr></table>";
closeside();
Kaip padaryt, kad straipsnius selectintų tik iš tam tikros kategorijos?
Parašė Noyz· 2011 Gru. 17 18:12:14
#3
Meta klaidą :/
You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near 'WHERE article_cat_id = '1' ORDER BY article_datestamp DESC LIMIT 0,77' at line 3
Parašė Noyz· 2011 Gru. 17 22:12:15
#4
Mirė šis tinklapis, ankščiau 30min ir 10 atsakymų, dabar 3-4 valandos 1 atsakymas..