This commit is contained in:
Joshua Perry 2023-02-04 21:36:27 +00:00
parent 841ab2f36f
commit c8548122cd
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ class DatabaseTable {
$this->pdo->prepare('UPDATE '. $this->table .' SET '. \implode(', ', $params) .' WHERE '. $this->pk .' = :primaryKey')->execute($record); $this->pdo->prepare('UPDATE '. $this->table .' SET '. \implode(', ', $params) .' WHERE '. $this->pk .' = :primaryKey')->execute($record);
} }
public function find($column, $value, $comparator = "=", $order = "ASC", $column2 = "", $value2 = "") { public function find($column, $value, $column2 = "", $value2 = "", $comparator = "=", $order = "ASC") {
if ($column2 == "" && $value2 == "") { if ($column2 == "" && $value2 == "") {
$values = [ $values = [
'value' => $value 'value' => $value

View File

@ -14,7 +14,7 @@ class Jobs {
} }
public function home() { public function home() {
$this->vars['jobs'] = $this->jobsTable->find("closingDate", date("y-m-d"), ">", "DESC"); $this->vars['jobs'] = $this->jobsTable->find("closingDate", date("y-m-d"), "", "", ">", "DESC");
return ['template' => 'home.html.php', return ['template' => 'home.html.php',
'title' => 'Jo\'s Jobs- Home', 'title' => 'Jo\'s Jobs- Home',
'vars' => $this->vars 'vars' => $this->vars