Huge updates:

1. Redesigned the web
2. Fixed logging in redirect issue
3. Added new route
4. Fixed sql issue on entry
5. Fixed typos
This commit is contained in:
2017-09-14 16:39:53 +07:00
parent ae8ce075e8
commit 00c5aba77d
12 changed files with 348 additions and 116 deletions

View File

@@ -13,7 +13,7 @@ class Access extends \Core\Model
'salt char(23) NOT NULL',
'full_name varchar(50) NOT NULL',
'registered_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP',
'privilage tinyint(1) NOT NULL DEFAULT 0',
'privilege tinyint(1) NOT NULL DEFAULT 0',
'status tinyint(1) NOT NULL DEFAULT 0',
'max_user int(1) NOT NULL DEFAULT 5',
'PRIMARY KEY (id)'

View File

@@ -130,31 +130,22 @@ class Post extends \Core\Model
$x = 1;
foreach ($args as $field) {
// Setting the query for multiple rows
if (is_array($field)) {
foreach ($field as $fields) {
$values .= '(?)';
if ($x < count($field)) {
$values .= ', ';
}
$x++;
}
} else {
if ($x === 1) {
$values .= '(';
}
$values .= '?';
if ($x < count($args)) {
$values .= ', ';
} else {
$values .= ')';
}
$x++;
if ($x === 1) {
$values .= '(';
}
$values .= '?';
if ($x < count($args)) {
$values .= ', ';
} else {
$values .= ')';
}
$x++;
}
try {
$sql = "INSERT INTO {$table} ({$keys}) VALUES {$values}";
var_dump($sql);
var_dump($args);
$db = static::connectDB();