echo pathinfo($path, PATHINFO_EXTENSION);
$mysqli = new mysqli('localhost', 'user', 'password', 'base');
/* проверка соединения */
if ($mysqli->connect_errno) {
printf("Соединение не удалось: %s\n", $mysqli->connect_error);
exit();
}
$query = "select * from `posts`$where".$limit_str;
if ($result = $mysqli->query($query)) {
/* извлечение ассоциативного массива */
while ($row = $result->fetch_assoc()) {
printf ("%s (%s)\n", $row["Name"], $row["CountryCode"]);
}
/* удаление выборки */
$result->free();
}
/* закрытие соединения */
$mysqli->close();
if(!$(".form-validate-jquery").valid()) { return; }
SELECT GROUP_CONCAT(t1.id) FROM table_name as t1 left join table_name as t2 on t2.id = t1.parent_id where t1.parent_id > 0 and t2.id is null
DELETE t1 FROM table_name as t1 left join table_name as t2 on t2.id = t1.parent_id where t1.parent_id > 0 and t2.id is null
<a href="#" id="<?= $meta['id'] ?>" class="f-catfilter__item custom-btn-filter j-button<? if($active) { ?> selected<? } if( ! $visible || ( $filter_seek && ! $meta['seek']) ) { ?> hide<? } ?>" data="{id:<?= $meta['id'] ?>,key:'<?= $meta['key'] ?>',type:'<?= $meta['type'] ?>',parent:<?= $meta['parent'] ?>,seek:<?= ($meta['seek']?'true':'false') ?>}">