Example #1
0
 public static function findByProductVersionId($id)
 {
     $productCatagory = ucfirst(Product::findProductCatagoryById($id));
     if (!$productCatagory) {
         return false;
     }
     require_once '../app/models/' . $productCatagory . '.php';
     $product = new $productCatagory();
     $sql = "SELECT *";
     $where = " WHERE product_version_id=? ";
     $sql = $product->generateSearchSql($sql, $where);
     $datatypes = 'i';
     $params = [$id];
     $results = Model::buildAndRunPreparedStatement($sql, $datatypes, $params);
     return $results->fetch_assoc();
 }