Hello there,
i am trying to create a custom page to display all albums in specific category in text link only.
for example
category 1 category 2 category 3
--> album 1 here ---> album 1 here ---> album 1 here
--> album 2 here ---> album 2 here ---> album 2 here
--> ..... --->... ---> album ....
I used this code earlier and I manually listing all albums in a category. And it really take me a hard time doing it manually.
<?php
define('IN_COPPERMINE', true);
require('include/init.inc.php');
pageheader('Album List (A-Z)');
starttable('Welcome');
?>
<div>
Album List Content here
</div>
<?php
endtable();
pagefooter();
ob_end_flush();
?>
I have attached the screenshot how the list is being displayed..
Do you know your way around with SQL? It's done with some quite easy SELECT queries.
i am not that adept with sql and php coding and only knows some basic html coding. I am still learning about it and i think its getting me crazy lol :o
Use a code like
$result = cpg_db_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category = 13");
$rowset = cpg_db_fetch_rowset($result);
mysql_free_result($result);
foreach ($rowset as $album) {
echo '<a href="thumbnails.php?album='.$album['aid'].'">'.$album['title'].'</a><br />';
}
for each category list.
Thanks a lot Αndré ;), it works really great.
Then please:
Quote from: Joachim Müller on September 28, 2008, 12:46:26 PM
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.