mysql의 기본설정은 대소문자를 구분하지 않는다.
쿠폰코드같은 대소문자를 구분해야하는 서비스의 경우 당황스러울수 있다.
데이터정렬방식을 utf8_bin 으로 설정해주면 해당 컬럼만 대소문자를 구분하게 할수 있다.
`coupon_num` varchar(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '쿠폰 번호',
- Posted
- Filed under 프로그래밍
Filesystem Size Used Avail Use% Mounted on /dev/root 7.2G 3.3G 3.6G 48% / devtmpfs 214M 0 214M 0% /dev tmpfs 218M 0 218M 0% /dev/shm tmpfs 218M 4.7M 213M 3% /run tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 218M 0 218M 0% /sys/fs/cgroup /dev/mmcblk0p1 56M 20M 37M 36% /boot tmpfs 44M 0 44M 0% /run/user/1000
Filesystem Size Used Avail Use% Mounted on /dev/root 7.3G 3.3G 3.7G 47% / devtmpfs 364M 0 364M 0% /dev tmpfs 368M 0 368M 0% /dev/shm tmpfs 368M 5.4M 363M 2% /run tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 368M 0 368M 0% /sys/fs/cgroup /dev/mmcblk0p1 56M 20M 37M 36% /boot tmpfs 74M 0 74M 0% /run/user/1000
cd languages wget http://nblang.nibbleblog.com/download/thebe/language/ko_KR.bit
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
#try_files $uri $uri/ =404;
try_files $uri $uri/ @rewrites;
}
location @rewrites {
rewrite ^/category/([^/]+)page-([0-9+])$ /index.php?controller=blog&action=view&category=$1&number=$2 last;
rewrite ^/category/([^/]+)/$ /index.php?controller=blog&action=view&category=$1&number=0 last;
rewrite ^/tag/([^/]+)/page-([0-9]+)$ /index.php?controller=blog&action=view&tag=$1&number=$2 last;
rewrite ^/tag/([^/]+)/$ /index.php?controller=blog&action=view&tag=$1&number=0 last;
rewrite ^/page-([0-9]+)$ /index.php?controller=blog&action=view&number=$1 last;
rewrite ^/post/([^/]+)/$ /index.php?controller=post&action=view&post=$1 last;
rewrite ^/post-([0-9]+)/(.*)$ /index.php?controller=post&action=view&id_post=$1 last;
rewrite ^/page/([^/]+)/$ /index.php?controller=page&action=view&page=$1 last;
rewrite ^/feed/$ /feed.php last;
rewrite ^/([^/]+)/$ /index.php?controller=page&action=$1 last;
}
