mysql select table case sensitive?

唔知搞咩黎.. 我之前部server 係case insensitive..
依家重裝左個server mysql version有少少唔同..
都係5.0.xx

但依家變左case sensitive.. 改d select code改死人...點解會咁既... thx

http://dev.mysql.com/doc/refman/ ... se-sensitivity.html

How table and database names are stored on disk and used in MySQL is affected by the lower_case_table_names system variable, which you can set when starting mysqld. lower_case_table_names can take the values shown in the following table. On Unix, the default value of lower_case_table_names is 0. On Windows the default value is 1. On Mac OS X, the default value is 2.

的確係有唔同. 上年做學校Assignment都發現到. 你修改一下Config.就無問題.

TOP

原帖由 GraphiteCube 於 2009-8-30 18:20 發表
http://dev.mysql.com/doc/refman/ ... se-sensitivity.html

How table and database names are stored on disk and used in MySQL is affected by the lower_case_table_names system variable, wh ...

原來係因為之前用linux...之後轉去windows.. 佢import 入去時,自動將d table變晒做細階...-.-
依家要逐個table改返...
個網有教改config咩? 好似睇唔到....

TOP

咁呢個似乎係原本 design 個程式時嘅問題... 下次寫 program code 最好諗定 case sensitive 唔好懶。

原帖由 Poissons 於 2009-8-30 18:09 發表
唔知搞咩黎.. 我之前部server 係case insensitive..
依家重裝左個server mysql version有少少唔同..
都係5.0.xx

但依家變左case sensitive.. 改d select code改死人...點解會咁既... thx

TOP

回覆 3# 的帖子

你可能要響/etc/mysql/my.cnf加返句

lower_case_table_names=0

我係用Debian的, Config. file path可能同你有少少唔同.

TOP

我搞掂左..唔該各位^_^

TOP

case sensitive 是好事....

TOP