내 데이터베이스의 내용을 다른 연도의 페이지로로드하려고합니다.데이터베이스에서 WordPress 페이지로로드
$yearQuery = mysql_query("SELECT DISTINCT YEAR(startDate) AS year FROM series ORDER BY startDate DESC");
if(mysql_num_rows($yearQuery) > 0) {
while($year = mysql_fetch_assoc($yearQuery)) {
echo "<li><a href='/teaching/podcasts?year=".$year['year']."'>".$year['year']."</a></li>";
}
}
else {
echo "<li>".mysql_error()."</li>";
}
나는 성공적으로 작동하려면 하나를 얻을 관리해야 : 이전 시리즈의 주 표시
while($yearSeries = mysql_fetch_assoc($yearSeriesQ)) {
echo "<div class='prevSermon'>";
echo "<div class='prevImage'>";
echo "<a href='/teaching/podcasts?id=".$yearSeries['id']."'><img height='90' width='90' alt='".$yearSeries['title']."' src='/admin/".$yearSeries['image']."'/></a>";
echo "</div>";
echo $yearSeries['title'];
echo "</div>";
}
합니다.
내가 몇 년 동안 잘못하고있는 것은 무엇입니까? bottom right hand side에있는 자료실은 무엇입니까?
Welcome to Stackoverflow! – Ma9ic
현재 아카이브 링크는 첫 번째 코드에 의해 생성되지 않습니다.이 링크는'podcasts/id ='에 대한 링크를 생성합니다. – andrewsi
예, @andrewsi가 지적했듯이, 링크하는 HTML 코드가 현재 보여주고있는 PHP와 일치하지 않습니다. 내일 다른 사이트로 연결하는 것보다 여기에 붙여 넣는 것이 좋습니다. – brasofilo