Coupon Change

This commit is contained in:
root 2022-02-03 09:45:59 +09:00
parent af2dfefdf2
commit 800633fe47
2 changed files with 4 additions and 4 deletions

View File

@ -63,13 +63,13 @@ abstract class Model
final public function getData($wheres = array(), $column = "*")
{
$sql = sprintf("SELECT %s FROM %s %s", $column, $this->getTable(), count($wheres) ? "WHERE " . implode("AND", $wheres) : "");
echo $sql;
//echo $sql;
return $this->getRow($sql);
}
final public function getDatas(array $wheres = array(), $column = "*")
{
$sql = sprintf("SELECT %s FROM %s %s", $column, $this->getTable(), count($wheres) ? "WHERE " . implode("AND", $wheres) : "");
echo $sql;
//echo $sql;
return $this->getRows($sql);
}
} //Class

View File

@ -38,13 +38,13 @@ class Service extends Model
final public function getOneTime($client_name)
{
$sql = sprintf("SELECT * FROM %s WHERE server_code = '%s-일회성'", $this->getTable(), $client_name);
echo $sql . "\n";
//echo $sql . "\n";
return $this->getRow($sql);
} //
final public function getCount($where = "")
{
$sql = sprintf("SELECT COUNT(*) FROM %s WHERE %s ", $this->getTable(), $where);
echo $sql . "\n";
//echo $sql . "\n";
$stmt = $this->execute($sql);
return $stmt->fetchColumn(0);
} //