SELECT materials.id,
materials.title,
materials.author,
materials.description,
types.name AS type,
categories.name AS category
FROM materials
LEFT JOIN categories
ON materials.id_category = categories.id
LEFT JOIN types
ON materials.id_type = types.id
LEFT JOIN tags_to_materials
ON materials.id = tags_to_materials.material_id
LEFT JOIN tags
ON tags.id = tags_to_materials.tag_id
WHERE materials.author LIKE '$str%'
OR materials.title LIKE '$str%'
OR categories.name LIKE '$str%'
OR tags.name LIKE '$str%'
select materials.id,
materials.title,
materials.author,
materials.description,
types.name AS type,
categories.name AS category
FROM materials
LEFT JOIN categories
ON materials.id_category = categories.id
LEFT JOIN types
ON materials.id_type = types.id
LEFT JOIN tags_to_materials
ON materials.id = tags_to_materials.material_id
LEFT JOIN tags
ON tags.id = tags_to_materials.tag_id
where materials.id in (
SELECT materials.id
FROM materials
LEFT JOIN categories
ON materials.id_category = categories.id
LEFT JOIN types
ON materials.id_type = types.id
LEFT JOIN tags_to_materials
ON materials.id = tags_to_materials.material_id
LEFT JOIN tags
ON tags.id = tags_to_materials.tag_id
WHERE materials.author LIKE '$str%'
OR materials.title LIKE '$str%'
OR categories.name LIKE '$str%'
OR tags.name LIKE '$str%' group by materials.id);
class Single
{
public array $data = [];
public static $instance;
PRIVATE function __construct()
{
}
public static function getInstance()
{
if (empty(self::$instance)) {
self::$instance = new Single();
}
return self::$instance;
}
public function __get(string $key)
{
return $this->data[$key]??null;
}
public function __set(string $key, $value)
{
$this->data[$key] = $value;
}
}
class A
{
public static function tryW()
{
Single::getInstance()->some = 1;
}
}
class B
{
public static function tryR()
{
var_dump(Single::getInstance()->some);
}
}
$a = new A();
$a->tryW();
$b = new B();
$b->tryR();
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?path=$1 [NC,L,QSA]
$stmt = pdo()->prepare("SELECT `name` FROM `get_package_name` where name = ?");
$stmt->execute([$_GET['name']]);
$get = $stmt->fetch(PDO::FETCH_ASSOC);
if(!isset($_GET['get_package'])){
die(json_encode($requestfailed_arr));
}
DB::table('MYTABLE')->insert([
'id' => $id,
'description' => mb_substr($description, 0, 255)
]);
For STRICT_TRANS_TABLES, MySQL converts an invalid value to the closest valid value for the column and inserts the adjusted value. If a value is missing, MySQL inserts the implicit default value for the column data type. In either case, MySQL generates a warning rather than an error and continues processing the statement. Implicit defaults are described in Section 11.6, “Data Type Default Values”.
Среди работников милиции провели тест на сообразительность. Суть теста: в металлической пластине вырезаны отверстия различной формы (квадрат, круг, треугольник и т. д. ), в них нужно вставить соответствующие металлические тела. По результатам теста работники милиции разделились на две группы:
1. Тупые.
2. Очень сильные.
curl 'https://www.proficosmetics.ru/bitrix/services/main/ajax.php?mode=ajax&c=krasivoereshenie%3Auser.auth&action=login' -X POST -H 'Accept: */*'-H 'Accept-Encoding: gzip, deflate, br' -H 'Referer: https://www.proficosmetics.ru/auth/' -H 'Bx-ajax: true' -H 'Content-Type: application/x-www-form-urlencoded' --data-raw 'login=123&password=123&remember=Y&SITE_ID=s1'
class Control
{
public function __construct(private ModelOne $baz){}
public function test()
{
$this->baz->bar();
}
}
(new Control(new ModelOne('some text')))->test();
class Control
{
private ModelOne $baz;
public function __construct(){
$this->baz = new ModelOne('some text');
}
public function test()
{
$this->baz->bar();
}
}
(new Control())->test();
print_r(get_headers('https://du.sf-converter.com/go?payload=1*eJzVlF2PmzgUhv9KNFKtXWlJwRgDlayKMPmemXzMJCS5iRhwwAkGwkcIqfa%2FryHdbXvZ1V5sbx6M4fj4nNd%2BvzzkSZl5dJVFD58ewqJI808fP1ZV1a2TsijfaddL%2BMfKLbzw84X4iwpVphNsvMXDH18jx%2F5PB7qlz5IfM2YZlCQpjyWXBRGOb7QbJEkQ0QvzadIu1Y7SyK3fXe%2F0mV5TllGiYA0bClYxApSR41S3tuf5eopeuVK988suC%2BwKsJQgrauoalfRYRdCAzCfJJJl9TPVWbhzqRfM5%2Fsp9SU%2BmkwdCL09TCd%2BUA88OB%2Bh6XkkIgo3IA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U7myTsrNKO7%2FNDgfmMTfqPJc58zrr5vj9Lpa5K5hbxcOnb97w519V2bVo*1656797692*b2dac99c14395ecd', true));
if(isset($red_status)=='Выбыл')
if(isset($red_status)&&$red_status=='Выбыл')