Magazines by Category & Publisher
This section is for adults only. Click here if you are
not over 18 years old.
';
echo 'Magazines by Category
';
// Begin list of all categories:
$query_join = "SELECT t1.description AS lev1, t2.description AS lev2, t2.category_id AS t2id
FROM admin_products.category AS t1
LEFT JOIN category AS t2 ON t2.parent_id = t1.category_id
WHERE t1.description = 'Magazine' ORDER BY t2.description DESC";
$result_join = @mysql_query ($query_join); // Run the query.
while ($row_join = mysql_fetch_array($result_join, MYSQL_ASSOC)) {
echo ''.$row_join['lev2'].'
';
$query_join1 = "SELECT t3.description AS lev3, t3.category_id AS t3id, t3.parent_id as t3pid, t4.description AS lev4
FROM admin_products.category AS t2
LEFT JOIN category AS t3 ON t3.parent_id = t2.category_id
LEFT JOIN category AS t4 ON t4.parent_id = t3.category_id
WHERE t3.parent_id = {$row_join['t2id']} ORDER BY t3.description";
$result_join1 = @mysql_query ($query_join1); // Run the query.
while ($row_join1 = mysql_fetch_array($result_join1, MYSQL_ASSOC)) {
echo ' '.$row_join1['lev3'].'
';
}
}
echo '
Magazines by Publisher
';
$query = "SELECT * FROM admin_products.publisher WHERE type = 1 ORDER BY publisher";
$result = @mysql_query ($query); // Run the query.
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo ''.$row['publisher'].'
';
}
?>