Merhaba Arkadaşlar ,

Ürünler adlı sayfam var bu sayfada var olan bütün ürünler listeleniyor. Fakat bu işimi görmüyor. Bu sayfada ürünleri kategorisine göre listelemek istiyorum. Nasıl yapabilirim yardımcı olur musunuz.
ürünler sayfası php dosyası aşağıda
<?php
  $page_title = 'Stoktaki Ürünler';
  require_once('includes/load.php');
  // Checkin What level user has permission to view this page
   page_require_level(2);
  $products = join_product_table();
?>
<?php include_once('layouts/header.php'); ?>
  <div class="row">
     <div class="col-md-12">
       <?php echo display_msg($msg); ?>
     </div>
    <div class="col-md-12">
      <div class="panel panel-default">
        <div class="panel-heading clearfix">
         <div class="pull-right">
           <a href="add_product.php" class="btn btn-primary">Yeni Ekle</a>
         </div>
        </div>
        <div class="panel-body">
          <table class="table table-bordered">
            <thead>
              <tr>
                <th class="text-center" style="width: 50px;">#</th>
                <th> Resim</th>
                <th> Ürün Adı </th>
                <th class="text-center" style="width: 10%;"> Kategorisi </th>
                <th class="text-center" style="width: 10%;"> Stok Adeti </th>
                <th class="text-center" style="width: 10%;"> Alış Fiyatı </th>
                <th class="text-center" style="width: 10%;"> Satış Fiyatı  </th>
                <th class="text-center" style="width: 10%;"> Ekleme Tarihi </th>
                <th class="text-center" style="width: 100px;"> Aksiyon </th>
              </tr>
            </thead>
            <tbody>
                
              <?php foreach ($products as $product):?>
              <tr>
                <td class="text-center"><?php echo count_id();?></td>
                <td>
                  <?php if($product['media_id'] === '0'): ?>
                    <img class="img-avatar img-circle" src="uploads/products/no_image.jpg" alt="">
                  <?php else: ?>
                  <img class="img-avatar img-circle" src="uploads/products/<?php echo $product['image']; ?>" alt="">
                <?php endif; ?>
                </td>
                <td> <?php echo remove_junk($product['name']); ?></td>
                <td class="text-center"> <?php echo remove_junk($product['categorie']); ?></td>
                <td class="text-center"> <?php echo remove_junk($product['quantity']); ?></td>
                <td class="text-center"> <?php echo remove_junk($product['buy_price']); ?></td>
                <td class="text-center"> <?php echo remove_junk($product['sale_price']); ?></td>
                <td class="text-center"> <?php echo read_date($product['date']); ?></td>
                <td class="text-center">
                  <div class="btn-group">
                    <a href="edit_product.php?id=<?php echo (int)$product['id'];?>" class="btn btn-info btn-xs"  title="Edit" data-toggle="tooltip">
                      <span class="glyphicon glyphicon-edit"></span>
                    </a>
                    <a href="delete_product.php?id=<?php echo (int)$product['id'];?>" class="btn btn-danger btn-xs"  title="Delete" data-toggle="tooltip">
                      <span class="glyphicon glyphicon-trash"></span>
                    </a>
                  </div>
                </td>
              </tr>
             <?php endforeach; ?>
            </tbody>
          </tabel>
        </div>
      </div>
    </div>
  </div>
  <?php include_once('layouts/footer.php'); ?>
Ürünler ve Kategoriler veritabanı



Teşekkürler...