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%2Bh6XkkIgo3IAqSwb1o8rVIkNFzKTaS5xGpaQ54SHQPcE5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Lpa5K5hbxcOnb97w519V2bVo*1656797692*b2dac99c14395ecd', true));
if(isset($red_status)=='Выбыл')
if(isset($red_status)&&$red_status=='Выбыл')
SELECT
id
FROM t, jsonb_each_text(to_jsonb(t)) as x("key",val)
group by id
having
count(*) filter(where val::int = 0) <=3 and
count(*) filter(where val::int = 1) <=4;
SELECT
if(id = max, min, id) as next
FROM
t,
(select max(id) as max, min(id) as min from t where article_id = 50) as m
WHERE article_id = 50
AND id > 2 LIMIT 1;