mysqldump -h$host -u$username --password="$password" --no-tablespaces $database > ./database-`date '+%Y%m%d'`.sql
cat ./database-[tab] | mysql -h$host -u$username --passwprd="$password" $database
<?php | |
if (!function_exists('array_group_by')) { | |
/** | |
* Groups an array by a given key. | |
* | |
* Groups an array into arrays by a given key, or set of keys, shared between all array members. | |
* | |
* Based on {@author Jake Zatecky}'s {@link https://github.com/jakezatecky/array_group_by array_group_by()} function. | |
* This variant allows $key to be closures. |
Уже давно не работаю с битрикс, сохраняю на память | |
Как сделать фильтр по возрасту для CUser::GetList ? | |
$stmp_1 = (new \DateTime())->modify('-18 year')->getTimestamp(); | |
$stmp_2 = (new \DateTime())->modify('-16 year')->getTimestamp(); | |
$filter = Array( | |
"PERSONAL_BIRTHDAY_1" => ConvertTimeStamp($stmp_1, 'SHORT'), | |
"PERSONAL_BIRTHDAY_2" => ConvertTimeStamp($stmp_2, 'SHORT') |