SELECT user_id
FROM some_table
WHERE num IN (878, 925, 242)
GROUP BY user_id
HAVING COUNT(DISTINCT num) = 3 -- 3 количество вариантов
;
SELECT some_table.user_id
FROM some_table
JOIN some_table st1 ON st1.user_id = some_table.user_id AND st1.num = 925
JOIN some_table st2 ON st2.user_id = some_table.user_id AND st2.num = 242
WHERE some_table.num = 878
;
SELECT user_id, GROUP_CONCAT(DISTINCT num ORDER BY num)
FROM some_table
WHERE num IN (878,925,242)
GROUP BY user_id
HAVING GROUP_CONCAT(DISTINCT num) = '242,878,925'
;
server {
listen 80;
#listen [::]:80 default_server;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
server_name my-site.com *.my-site.com;
charset utf-8;
access_log /var/www/logs/access.nginx.log;
error_log /var/www/logs/error.nginx.log error;
set $subdomain "www";
if ($host ~* ^([-a-z0-9]+)\.my-site\.com$) {
set $subdomain $1;
}
if ($host ~* ^www\.my-site\.com$) {
rewrite ^/(.*)$ http://my-site.com/$1 permanent;
}
root /var/www/$subdomain/public;
client_max_body_size 32M;
location / {
rewrite ^/.*$ /index.php last;
}
# Pass the PHP scripts to FastCGI server
location ~ ^/index.php {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
}
\w matches any word character (equal to [a-zA-Z0-9_])
\w match any word character in any script (equal to [\p{L}\p{N}_])
$main = "<div class = \"registration\"><form method = \"POST\">
<span>Логин</span><input name = \"login\" maxlength= \"20\" placeholder = \"от 5 до 20 символов\">
<span>Пароль</span><input ".my_echo_function()." type = \"password\" maxlength= \"20\" name = \"password\" placeholder = \"от 8 до 20 символов\">
<span>Повторите пароль</span><input type = \"password\" maxlength= \"20\" name = \"copyPassword\" placeholder = \"от 8 до 20 символов\">
<span>Почта</span><input name = \"email\" placeholder = \"example@mail.ru\">
<span>Дата рождения</span><input name = \"date_birth\" placeholder = \"дд.мм.гггг\">
<input type = \"submit\" name = \"submit\" value = \"Зарегистрироваться\">
</form></div>";
$c = "▄";
echo ord(mb_convert_encoding($c, "CP866", "UTF8"));