Skip to content

Commit

Permalink
cron implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
vojjin-gmail committed Aug 18, 2023
1 parent 89bb2a8 commit 9493ebf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/mysql/Mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,14 @@ function readTableSingleValuesSqlWithId($sql, $column): array {
return $ret;
}

function readTableSql($sql): array {
function readTableSql($sql, $id = ""): array {
$ret = [];
$r = $this->executeSelectQuery($sql);
foreach ($r as $row) {
$ret[] = $row;
if ($id == "")
$ret[] = $row;
else
$ret[$row[$id]] = $row;
}
return $ret;

Expand Down
8 changes: 8 additions & 0 deletions src/various/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,12 @@ static function validate_path($a): bool {
return self::pregcheck($a, '/^[0-9a-z_\/\-]{1,255}$/');
}

static function validate_order($a): bool {
return self::pregcheck($a, '/^[A-Z0-9]{6}$/');
}

static function validate_localorder($a): bool {
return self::pregcheck($a, '/^[A-Z0-9]{7}$/');
}

}

0 comments on commit 9493ebf

Please sign in to comment.