Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, bool given in C:\Users\USER\Desktop\Final Year Project\XAMPP\htdocs\littleavenue\shop.php on line 320

<?PHP

                               if(!isset($_GET['product_category'])){

                                  if(!isset($_GET['category'])){

                                      $per_page = 6;

                                  if(isset($_GET['page'])){

                                      $page = $_GET['page'];

                                  } else {

                                     $page = 1; 

                                  }

                                  $startfrom = ($page-1) * $per_page;

                                  $getproducts = " SELECT * FROM products OREDR BY 1 DESC LIMIT $startfrom, $per_page";      

                                  $runproducts = mysqli_query($connection,$getproducts);

                                ////LINE 320 ////     while($row = mysqli_fetch_array($runproducts)){ ////LINE 320////

                                        $productid = $row['product_id'];  

                                        $producttitle = $row['product_title'];

                                        $productprice = $row['product_price'];

                                        $productimgone = $row['product_img1'];  

                                        echo "<div class='col-md-4 col-sm-6 center-responsive' >

                                                    <div class='product' >

                                                        <a href='productdetails.php?product_id=$productid' >

                                                            <img src='admin/product_images/$proproductimgone' class='img-responsive' >

                                                        </a>

                                                        <div class='text'>

                                                            <h3><a href='productdetails.php?product_id=$productid'>$producttitle</a></h3>

                                                            <p class='price'>$ $productprice</p>

                                                            <p class='buttons'>

                                                                <a href='productdetails.php?product_id=$productid' class='btn btn-default'>Details</a>

                                                                &nbsp;

                                                                <a href='productdetails.php?product_id=$productid' class='btn btn-primary'>

                                                                   <i class='fa fa-shopping-cart'></i>&nbsp; Add To cart

                                                                </a>

                                                            </p>

                                                        </div>

                                                    </div>

                                                </div> ";  

                                      }

                               ?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.