<style>
.user-114__avatar
{
background-image: url({{thumbnail}});
}
</style>
...
<!-- какие-то общие стили для аватара прописаны в классе user__avatar в файле css, а изменяемые прямо в HTML-->
<div class="user__avatar user-114__avatar">
</div>
<!-- какие-то общие стили для аватара прописаны в классе user__avatar в файле css, а изменяемые прямо в инлайн-атрибуте тега-->
<div class="user__avatar" style="background-image: url({{thumbnail}});">
</div>
CREATE TABLE tbl( date DATETIME, name VARCHAR(25), price INT);
INSERT INTO tbl VALUES
('2020-01-01', 'laptop', 210),
('2020-01-01', 'pc', 100),
('2020-01-02', 'laptop', 150),
('2020-01-02', 'pc', 200),
('2020-01-03', 'laptop', 150),
('2021-01-01', 'pc', 110),
('2021-01-01', 'laptop', 220),
('2021-01-02', 'pc', 210),
('2021-01-02', 'laptop', 200),
('2021-01-03', 'pc', 260);
SELECT T2.date, T2.name, ( T2.price + T1.price ) / 2
FROM tbl T2
JOIN tbl T1 ON T1.name = T2.name
AND T1.date = LAST_DAY(T2.date - INTERVAL 1 MONTH) + INTERVAL 1 DAY
ORDER BY 1, 2
FROM " . DB_PREFIX . "product_to_category ptc LEFT JOIN . DB_PREFIX . "category_description"
FROM oc_product_to_category ptcoc_category_description
LEFT JOIN oc_
?$q = mysqli_prepare($connection, "INSERT INTO `user_value` (`user_name`, `user_pass`) VALUES (?, ?)");
$q->bind_param("ss", $user_names, $user_pass);
$q->execute();
services:
...
App/Interfaces/UserRepositoryInterface:
alias: App/Repositories/UserRepository
<?php
class FOO {
public function bar() {
echo "Method bar called" . PHP_EOL;
return $this;
}
public function baz() {
echo "Method baz called" . PHP_EOL;
return $this;
}
}
$foo = new FOO;
$foo->bar()->baz();
$mysql = new mysqli("localhost", "root", "root", "medixer");
$mysql->set_charset("utf8");
$stmt = $conn->prepare("INSERT INTO `users` (`login_user`, `name`, `password`, `dob`, `region`, `telephone`, `email`) VALUES (?, ?, ?, ?, ?, ?, ?)");
$stmt->bind_param("sssssss", $login, $name, $password, $dob, $region, $telephone, $email);
$stmt->execute();
$mysql->close();
cur.execute("""INSERT INTO commands (user_id, date, command_name) VALUES (7 , {} , 'd')""".format(time_now))
cur.execute("INSERT INTO commands (user_id, date, command_name) VALUES (7 , ?, 'd')", (time_now,))
<?php
$query = "SELECT DATE(`time`) `Day`, SUM(`Profit`) `DaylyProfit`
FROM `history`
WHERE `type` = 1 AND `time` > DATE_SUB(CURRENT_DATE, INTERVAL 6 DAY)
GROUP BY `Day`
ORDER BY `Day` DESC;";
$result = $mysqli->query($query);
$all = $result -> fetch_all(MYSQLI_ASSOC);
echo json_encode($all);