Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ul class="roh-list">
- <?php
- $sql = "
- SELECT DISTINCT(category) AS category FROM mytable WHERE subject = 'animals' && subcat = 'cats'
- ";
- $results = $db->query($sql);
- if($results->num_rows) {
- While($row = $results->fetch_object()) {
- echo "
- <li><a href='categories/{$row->thing}/roh-index.php'>{$row->category}</a></li>
- ";
- }
- } else {
- echo 'No Results';
- }
- ?>
- </ul>
Add Comment
Please, Sign In to add comment