Add files via upload
This commit is contained in:
@ -27,7 +27,7 @@
|
||||
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database');
|
||||
|
||||
while($fila=$resul->fetch_assoc()){
|
||||
$promotions[] = $this->loadPromotion($fila["id"], $fila["tittle"], $fila["description"], $fila["code"], $fila["active"], $fila["img"],);
|
||||
$promotions[] = $this->loadPromotion($fila["id"], $fila["tittle"], $fila["description"], $fila["code"], $fila["active"], $fila["img"]);
|
||||
}
|
||||
$resul->free();
|
||||
return $promotions;
|
||||
@ -76,6 +76,20 @@
|
||||
|
||||
return $resul;
|
||||
}
|
||||
|
||||
//Returns a film data .
|
||||
public function GetPromotionObj($code){
|
||||
$sql = sprintf( "SELECT * FROM promotion WHERE promotion.code = '%s'", $code );
|
||||
$resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database');
|
||||
|
||||
$promo = null;
|
||||
while($fila = $resul->fetch_assoc()){
|
||||
$promo = $this->loadPromotion($fila["id"], $fila["tittle"], $fila["description"], $fila["code"], $fila["active"], $fila["img"]);
|
||||
}
|
||||
$resul->free();
|
||||
|
||||
return $promo;
|
||||
}
|
||||
|
||||
//Create a new film Data Transfer Object.
|
||||
public function loadPromotion($id, $tittle, $description, $code, $active, $img){
|
||||
|
Reference in New Issue
Block a user