public static function getProducts($count = self::SHOW_BY_DEFAULT)
{
$db = Db::getConnection();
$productsList = array();
$st= $db->prepare('SELECT id, name, price FROM product '
. 'WHERE status = "1"'
. 'ORDER BY id DESC '
. 'LIMIT ' . $count);
if ($st && $st->execute()) {
$i = 0;
while ($row = $st->fetch()) {
$productsList[$i]['id'] = $row['id'];
$productsList[$i]['name'] = $row['name'];
$productsList[$i]['price'] = $row['price'];
$i++;
}
}
return $productsList;
}
UPDATE `Remont` SET `Data_zaversheniy_rabot` = NOW() WHERE `ID_oborudovaniy` = :zav_id