senzacionale senzacionale - 1 year ago 79
MySQL Question

xampp and mysql all columns in table are lower case in php

If I print_r($object) I get:

Array ( [id] => 1 [ime] => rwe [letnica] => 0 [mesec] => 1 [datoteka] => [disciplineid] => 2 [rangtekmovanjaid] => 3 )

My DB columns are:

- disciplineId
- rangtekmovanjaId

I set
in my.ini for mysql 5.0 part of xampp but is the same. What is wrong?

Answer Source

According to MySQL manual

You should NOT set this variable to 0 if you are running MySQL on a system that has case-insensitive file names (such as Windows or Mac OS X). If you set this variable to 0 on such a system and access MyISAM tablenames using different lettercases, index corruption may result. On Windows the default value is 1. On Mac OS X, the default value is 2.

MySQL: Identifier Case Sensitivity

In MySQL, databases correspond to directories within the data directory. Each table within a database corresponds to at least one file within the database directory (and possibly more, depending on the storage engine). Consequently, the case sensitivity of the underlying operating system plays a part in the case sensitivity of database and table names. This means database and table names are not case sensitive in Windows, and case sensitive in most varieties of Unix. One notable exception is Mac OS X, which is Unix-based but uses a default file system type (HFS+) that is not case sensitive.


By default, table aliases are case sensitive on Unix, but not so on Windows or Mac OS X.

That means, on Linux servers (Unix) table/column name "Test" is not equal with "test", "TEST", "tESt", etc. by default.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download