Whoops! There was an error.
Error
Call to a member function fetch_all() on bool Error thrown with message "Call to a member function fetch_all() on bool" Stacktrace: #3 Error in /home/eurekaismapp/public_html/addon/gardengenesis.app/model/config.model.php:34 #2 Database:all_query in /home/eurekaismapp/public_html/addon/gardengenesis.app/class/special_offer.class.php:40 #1 Special_offer:get_random in /home/eurekaismapp/public_html/addon/gardengenesis.app/view/product-details.php:30 #0 include in /home/eurekaismapp/public_html/addon/gardengenesis.app/index.php:73
Stack frames (4)
3
Error
/model/config.model.php34
2
Database all_query
/class/special_offer.class.php40
1
Special_offer get_random
/view/product-details.php30
0
include
/index.php73
/home/eurekaismapp/public_html/addon/gardengenesis.app/model/config.model.php
  }
    
    public function is_server_up(){
        $sql  = "select status from server_up where id = '1'";
        $response = $this->single_query($sql);
        return $response['status'];
    }
    public function sanitize($sql){
      $this->sql = $sql;
      return $this->mysqli->real_escape_string($sql);
    }
  
        public function single_query($sql){
        $this->sql = $sql;
        return $this->mysqli->query($sql)->fetch_array(MYSQLI_ASSOC);    
        }
        
        public function all_query($sql){
            $this->sql = $sql;
        return $this->mysqli->query($sql)->fetch_all(MYSQLI_ASSOC);
        }
        
        public function run_query($sql){
            $this->sql = $sql;
            $this->mysqli->query($sql);
        }
        
        public function insert($data,$table){
            $column_name = array();
            $column_value = array();
            foreach($data as $column => $value){
                        $column_name[] = $column;
                        $column_value[] = $value;
            }
            $column_name = implode(",",$column_name);
            $column_value = implode("','",$column_value);
            $insert = "insert into $table($column_name) values ('{$column_value}')";
            return $insert;
        }
        
/home/eurekaismapp/public_html/addon/gardengenesis.app/class/special_offer.class.php
             $sql = "select p.*,pv.* , sum(quantity) as total_sold from products p,product_variation pv,cart_transaction_header cth, cart_transactions ct where cth.receipt_no = ct.receipt_no and ct.product_id = p.product_id and pv.productid = p.product_id and p.availability = '1' and cth.status IN ('1','2','3') group by ct.product_id order by total_sold desc";
             $response = $this->all_query($sql);
             return $response;
        }
 
        public function get_product_top_index(){
             $sql = "select p.*,pv.* , sum(quantity) as total_sold from products p,product_variation pv,cart_transaction_header cth, cart_transactions ct where cth.receipt_no = ct.receipt_no and ct.product_id = p.product_id and pv.productid = p.product_id and p.availability = '1' and cth.status IN ('1','2','3') group by ct.product_id order by total_sold desc limit 4";
             $response = $this->all_query($sql);
             return $response;
        }
        public function get_date_special_offer(){
        $date = date("Y-m-d H:i:s");
            $sql = "select so.*,p.*,pv.* from special_offer so,products p,product_variation pv where so.sku = pv.sku_number and so.product_id = pv.productid and pv.productid = p.product_id and pv.status = '1' and pv.promo_start <= '{$date}' and pv.promo_end >= '{$date}' order by pv.promo_end asc limit 1";
            $response = $this->single_query($sql);
            return $response;
        }
        public function get_random(){
        $date = date("Y-m-d H:i:s");
            $sql = "select so.*,p.*,pv.* from special_offer so,products p,product_variation pv where pv.productid = p.product_id and p.availability = '1' group by p.product_id order by RAND() ";
            $response = $this->all_query($sql);
            return $response;
        }
        
        public function calculate_percent_sold($productid,$sku,$datefrom,$dateto,$originalqty){
        $promo_start = explode(" ",$datefrom);
        $promo_start = $promo_start['0'];
        
        $promo_end = explode(" ",$dateto);
        $promo_end = $promo_end['0'];
        
        $sql = "select sum(ct.quantity) as total from cart_transactions ct , cart_transaction_header cth , special_offer so, product_variation pv where so.product_id = pv.productid and so.sku = pv.sku_number and pv.productid = ct.product_id and pv.id = ct.type and so.product_id = '{$productid}' and so.sku = '{$sku}' and cth.receipt_no = ct.receipt_no and cth.status IN ('1','2','3') and cth.datetime_created between '{$promo_start}' and '{$promo_end}'";
        $response = $this->single_query($sql);
        $total = $response['total'];
        
        $percent = ($total/$originalqty) * 100;
        return $percent;
        
        }
 
        public function calculate_total_sold($productid,$sku,$datefrom,$dateto,$originalqty){
/home/eurekaismapp/public_html/addon/gardengenesis.app/view/product-details.php
    $special_offer_controller = new Special_offer();
    
    $parameter = "DNA-MILE Simple";
 
    $all_product_category = $category_controller->get_category_product();
    $all_image = $product_controller->get_product_details_image($parameter);
    
    $product_details = $product_controller->get_product_details_name($parameter);
    $productid = $product_details['product_id'];
    
    $price = $product_details['product_price'];
    
    $product_variation = $product_controller->get_product_variation($productid);
    
    $description = $product_controller->product_description($productid);
    $description = $description['description_en'];
    
    $product_cat = $product_controller->get_product_same_category($productid);
 
    $all_product_special_offer = $special_offer_controller->get_random();
    $rand = $product_controller->get_product_rand_sql();
?>
 
 
<section class="welcome_area" >
        <div class="welcome_slides owl-carousel">
        </div>
    </section>
 
 
<style>
 
 
.footer-main a{
    font-weight:500 !important;
}
 
.footer-main p{
    font-weight:500 !important;
}
/home/eurekaismapp/public_html/addon/gardengenesis.app/index.php
}
body, html{
    overflow-x: hidden;
    -webkit-overflow-scrolling: none;
    /* Other browsers */
    overscroll-behavior: none;
     max-width: 100vw;
     position: relative;
}
::-webkit-scrollbar {
    display: none; // Safari and Chrome
}
</style>
<?php } ?>
<?php
 
if ($filename == "profile-preview") {
    $full_path = "./profile-preview/theme/index.html";  
    include($full_path);
}else if(include($full_path)){
  
}else{
    header("HTTP/1.1 200 OK");
    include($error);
}
 
}else{ }
 
 
?>
 

Environment & details:

Key Value
/product-details/DNA-MILE_Kit
empty
empty
empty
empty
Key Value
USER eurekaismapp
HOME /home/eurekaismapp
SCRIPT_NAME /index.php
REQUEST_URI /product-details/DNA-MILE+Kit
QUERY_STRING /product-details/DNA-MILE+Kit
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_QUERY_STRING /product-details/DNA-MILE+Kit
REDIRECT_URL /product-details/DNA-MILE+Kit
REMOTE_PORT 34912
SCRIPT_FILENAME /home/eurekaismapp/public_html/addon/gardengenesis.app/index.php
SERVER_ADMIN webmaster@gardengenesis.app.eurekaism.app
CONTEXT_DOCUMENT_ROOT /home/eurekaismapp/public_html/addon/gardengenesis.app
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /home/eurekaismapp/public_html/addon/gardengenesis.app
REMOTE_ADDR 3.236.207.90
SERVER_PORT 443
SERVER_ADDR 172.31.10.13
SERVER_NAME www.gardengenesis.app
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
PATH /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin
HTTP_X_HTTPS 1
HTTP_CONNECTION Keep-Alive
HTTP_HOST www.gardengenesis.app
HTTP_ACCEPT_ENCODING br,gzip
HTTP_IF_MODIFIED_SINCE Mon, 30 Jan 2023 05:10:59 GMT
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
proxy-nokeepalive 1
SSL_TLS_SNI www.gardengenesis.app
HTTPS on
SCRIPT_URI https://www.gardengenesis.app/product-details/DNA-MILE+Kit
SCRIPT_URL /product-details/DNA-MILE+Kit
UNIQUE_ID ZCTByVNOJkVmsHI9rY_N4gAAAAo
REDIRECT_STATUS 200
REDIRECT_SSL_TLS_SNI www.gardengenesis.app
REDIRECT_HTTPS on
REDIRECT_SCRIPT_URI https://www.gardengenesis.app/product-details/DNA-MILE+Kit
REDIRECT_SCRIPT_URL /product-details/DNA-MILE+Kit
REDIRECT_UNIQUE_ID ZCTByVNOJkVmsHI9rY_N4gAAAAo
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1680130505.342
REQUEST_TIME 1680130505
argv Array ( [0] => /product-details/DNA-MILE [1] => Kit )
argc 2
BASE_URL gardengenesis.app
APP_NAME GARDENGENESIS
ENVIRONMENT stagging
HOST localhost
DB_USERNAME eurekaismapp_gardengenesis
DB_PASSWORD Minimo2023
DB_NAME eurekaismapp_gardengenesis
stripe_mode live
live_pk_key pk_live_51LRnF0Bv8asdasdasdNh3oEs0eSNTjgYIgm8vDrmJz6Ly9KpVQ4HKCcKsC18QetcmjqMidOxftTiPqa4RItNojRob8oKv855000PZRsw8AO
live_sk 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
test_pk_key pk_test_51LRnF0Bv8Nh3oEs01udNFQ14NXND920eVkzOaD1DMqSDeNJMavPdgqZfIcyly0zZRus3nikLxwEYzohknXd4fsXc00TECS32LR
test_sk sk_test_51LRnF0Bv8Nh3oEs01nd9anqPmX8GUH7yFUfWKy4JaDGFsJXYeTiO9VAqiSQLSzqDN6WQHDcp9MwbHLnstSKFEV7G00Exh8zdDc
REFUND_ENDPOINT https://gardengenesis.app/stripe/api/refund.php
CREATE_RECEIPT https://gardengenesis.app/stripe/api/stripe/create-receipt
SITE_KEY 51714f9c-c7ce-4560-af21-6795de63f7d6
SECRET 0xD9171Af338cEa44f8834B2E6E661c492eddEB20D
Key Value
BASE_URL gardengenesis.app
APP_NAME GARDENGENESIS
ENVIRONMENT stagging
HOST localhost
DB_USERNAME eurekaismapp_gardengenesis
DB_PASSWORD Minimo2023
DB_NAME eurekaismapp_gardengenesis
stripe_mode live
live_pk_key pk_live_51LRnF0Bv8asdasdasdNh3oEs0eSNTjgYIgm8vDrmJz6Ly9KpVQ4HKCcKsC18QetcmjqMidOxftTiPqa4RItNojRob8oKv855000PZRsw8AO
live_sk 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
test_pk_key pk_test_51LRnF0Bv8Nh3oEs01udNFQ14NXND920eVkzOaD1DMqSDeNJMavPdgqZfIcyly0zZRus3nikLxwEYzohknXd4fsXc00TECS32LR
test_sk sk_test_51LRnF0Bv8Nh3oEs01nd9anqPmX8GUH7yFUfWKy4JaDGFsJXYeTiO9VAqiSQLSzqDN6WQHDcp9MwbHLnstSKFEV7G00Exh8zdDc
REFUND_ENDPOINT https://gardengenesis.app/stripe/api/refund.php
CREATE_RECEIPT https://gardengenesis.app/stripe/api/stripe/create-receipt
SITE_KEY 51714f9c-c7ce-4560-af21-6795de63f7d6
SECRET 0xD9171Af338cEa44f8834B2E6E661c492eddEB20D
0. Whoops\Handler\PrettyPageHandler