mirror of
https://github.com/sctn4elk/CustomerRewardsRESTAPI.git
synced 2025-01-09 23:24:30 -06:00
36 lines
966 B
PHP
36 lines
966 B
PHP
<?php
|
|
|
|
/*
|
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
|
|
*/
|
|
|
|
/**
|
|
* Description of ImageModel
|
|
*
|
|
* @author SCTN4
|
|
*/
|
|
class ImageModel extends Database {
|
|
use ModelTraits;
|
|
|
|
public function insertImage($inputModel)
|
|
{
|
|
//$query = "INSERT INTO " . $this->imageTable;
|
|
//$query .= " (filename, filepath) VALUES (?,?)";
|
|
|
|
//return var_dump($jsonPayLoad);
|
|
$keys = array_keys($inputModel);
|
|
$n = count($keys);
|
|
|
|
$query .= "CALL insert_customer_image_proc (";
|
|
for($i = 0; $i < $n-1; $i++) {
|
|
$query .= "'" . $inputModel[$keys[$i]] . "', ";
|
|
}
|
|
$query .= $inputModel[$keys[$i]] . ")";
|
|
//return var_dump($query);
|
|
|
|
$rowCount = $this->processImage($query);
|
|
return $rowCount;
|
|
}
|
|
}
|