code_junkie

Is there a way to force case sensitivity in MySQL / Rails for a single find?

Nov 12th, 2011
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. Tag.find(:some-special-option-here)
  2.  
  3. SELECT * FROM mytable WHERE myfield='Value'
  4.  
  5. SELECT * FROM mytable WHERE BINARY myfield='Value'
  6.  
  7. create_table( "page_infos", :force => true, :options => "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin") do |t|
  8. t.string "title", :limit => 120
  9. end
  10.  
  11. ALTER TABLE `sets` CHANGE `set_name` `set_name` VARCHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
Add Comment
Please, Sign In to add comment