Coupon Change
This commit is contained in:
parent
af2dfefdf2
commit
800633fe47
@ -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
|
||||
|
||||
@ -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);
|
||||
} //
|
||||
|
||||
Loading…
Reference in New Issue
Block a user