×

Sign in with twitter.

You can follow the user and hashtags.

Share your tips on social media.

Post relative tips.

If you have relative tips, click [Add relative tips] to post.

MYSQLで濁音、半濁音も検索対象にするSQL文

@cakephper@cakephper 2450 viewer 58 embed viewer embed
下記のwhere句でハ、バ、パから始まる値を検索対象にできる。 ORとか使わなくて良い。
where kana COLLATE utf8_unicode_ci like 'ハ%'

Cakeだと
array('conditions' => array('kana COLLATE utf8_unicode_ci like' => 'ハ%'))
こんな感じでできるかも(未検証)

#SQL #MySQL
Add relative tips

Users who share this tip.

Comments