This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Company\Components; | |
defined('B_PROLOG_INCLUDED') || die(); | |
class SiteSelector extends \CBitrixComponent | |
{ | |
/** | |
* @var array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE INDEX category_name_word_auto_idx ON category (name) | |
WHERE name LIKE 'авто%'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM category c | |
WHERE NOT EXISTS(SELECT * FROM category s WHERE s.parent_category_id = c.id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM category c | |
WHERE (SELECT count(*) FROM category s WHERE s.parent_category_id = c.id) BETWEEN 1 AND 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM category | |
WHERE parent_category_id IS NULL | |
AND name LIKE 'авто%'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE category ( | |
id INTEGER NOT NULL PRIMARY KEY, | |
parent_category_id INTEGER REFERENCES category(id), | |
name VARCHAR(100) NOT NULL | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+--------------------------+----------------------------+ | |
| Variable_name | Value | | |
+--------------------------+----------------------------+ | |
| character_set_client | utf8 | | |
| character_set_connection | utf8 | | |
| character_set_database | utf8 | | |
| character_set_filesystem | binary | | |
| character_set_results | utf8 | | |
| character_set_server | utf8 | | |
| character_set_system | utf8 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[client] | |
default-character-set=utf8 | |
[mysql] | |
default-character-set=utf8 | |
[mysqld] | |
sql-mode='' | |
init_connect='SET collation_connection = utf8_unicode_ci' | |
init_connect='SET NAMES utf8' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
use Bitrix\Main\Diag\Debug; | |
// не хватит памяти для обработки 586К сделок | |
ini_set('memory_limit', '1024M'); | |
// может быть очень долго будет работать | |
set_time_limit(0); | |
define('NO_KEEP_STATISTIC', true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerName dev.local | |
ServerAdmin dev@localhost | |
DocumentRoot /home/ruzel/www/dev.local | |
LogLevel debug | |
ErrorLog /home/ruzel/www/dev.local/error.log | |
CustomLog /home/ruzel/www/dev.local/access.log combined | |
<Directory /home/ruzel/www/dev.local> |
NewerOlder