1 _info?>FAQ body<= [Add to FAQ]\n"; } my %faqcat; my %faqq; $sth = $dbh->prepare("SELECT faqcat, faqcatname, catorder FROM faqcat"); $sth->execute; while ($_ = $sth->fetchrow_hashref) { $faqcat{$_->{'faqcat'}} = $_; } $sth = $dbh->prepare("SELECT faqid, question, sortorder, faqcat, lastmodtime FROM faq"); $sth->execute; while ($_ = $sth->fetchrow_hashref) { $faqq{$_->{'faqcat'}}->{$_->{'faqid'}} = $_; } foreach my $faqcat (sort { $faqcat{$a}->{'catorder'} <=> $faqcat{$b}->{'catorder'} } keys %faqcat) { $ret .= "

" . LJ::ehtml($faqcat{$faqcat}->{'faqcatname'}) . "

\n"; $ret .= "\n"; } return $ret; _code?> <=body page?> lib: cgi-bin/ljlib.pl link: htdocs/admin/faq/readcat.bml, htdocs/admin/faq/faqedit.bml _c?>