-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Добавлена новая функция #10
base: master
Are you sure you want to change the base?
Conversation
* @param array $data Ассоциативный массив с данными для шаблона | ||
* @return string Итоговый HTML | ||
*/ | ||
function includeTemplate($name, array $data = []) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function includeTemplate(string $name, array $data = []): string
{
*@param string $data | ||
*@return int | ||
*/ | ||
function remainingTime(string $date) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
добавить тип для возвращаемого значения
@@ -29,7 +39,7 @@ function is_date_valid(string $date) : bool { | |||
* | |||
* @return mysqli_stmt Подготовленное выражение | |||
*/ | |||
function db_get_prepare_stmt($link, $sql, $data = []) { | |||
function dbGetPrepareStmt($link, $sql, $data = []) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function dbGetPrepareStmt(mysqli $link, string $sql, $data = []): mysqli_stmt
{
created_at DATETIME DEFAULT CURRENT_TIMESTAMP, | ||
email VARCHAR(255) NOT NULL UNIQUE, | ||
name VARCHAR(100) NOT NULL, | ||
passw CHAR(50) NOT NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHAR(60)
CREATE TABLE lots ( | ||
id INT AUTO_INCREMENT PRIMARY KEY, | ||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP, | ||
created_title VARCHAR(255) NOT NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
убрать ненужный префикс created_
end_date DATETIME NOT NULL, | ||
rate_step INT NOT NULL, | ||
author_id INT NOT NULL, | ||
winner_id INT DEFAULT NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
winner_id INT NULL,
FOREIGN KEY (category_id) REFERENCES categories(id) ON DELETE CASCADE | ||
); | ||
|
||
CREATE TABLE rate ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rates
Добавлена новая функция в functions