$query = $db->prepare('INSERT INTO employees (first_name, second_name, middle_name, id_position)
VALUES (:first_name, :second_name, :middle_name, :id_position');
$query->execute(
[
':first_name' => $f_name,
':second_name' => $s_name,
':middle_name' => $m_name,
':id_position' => $position
]);
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:nginx/stable
sudo apt-get install nginx
sudo apt-get install php
sudo apt install mysql-server mysql-client
sudo apt-get install phpmyadmin php-mbstring php-gettext
sudo apt-get install php7.0-sqlite
sudo phpenmod mcrypt mbstring
sudo apt-get install php-curl cron
sudo mkdir /etc/nginx/sites-available && sudo mkdir /etc/nginx/sites-enabled
$product = Products::findFirst($id);
$tags = $product->tags;
//или
$tags = $product->getTags();
// можно
$tags = $product->getTags('id != 1');
// и даже так
$tags = $this->modelsManager->executeQuery(
"SELECT t.* FROM \Models\Products p
LEFT JOIN \Models\Tags t ON t.postId = p.id ");
$id = $_GET['id']; // Можно $id = (int) $_GET['id'];
$st = $db->prepare("SELECT * from `sites` WHERE `id`= :id LIMIT 1");
$st->bindParam(":id", $id, PDO::PARAM_INT);
$st->execute();
$dg = $st->fetch();
href='/go/" . (int) $dg['id'] . "'
$id = abs(intval(trim($_GET['id'])));
echo $indexpage;
echo $d_footer;
echo $copyright;
echo $foot;
if ($_SESSION['check'] == 1) {
echo $d_key . "<a href='/edit/'> <b>Изменить</b></a>";
if ($_SESSION['v'] == 1)
echo "<br/>";
}