Thinkphp database table names are case sensitive. this is my controller code.
select(); var_dump($a); die; $this->display(); }}
This is an error:
1146: Table 'movierdc. praise 'doesn' t exist [SQL statement]: SHOW COLUMNS FROM 'Praise'
Declare that my table name is correct. there is a table in all lower case in the database, and the query is normal. The first letter cannot be capitalized.
The following are methods that have been tried and are useless:
'Db _ PARAMS '=> array (\ PDO: ATTR_CASE => \ PDO: CASE_NATURAL ),
Have you encountered a similar problem? how can this problem be solved? Job search!
Reply to discussion (solution)
No problem in windows
Linux is hard to say.
'Db _ PARAMS '=> array (\ PDO: ATTR_CASE => \ PDO: CASE_NATURAL ),
'Db _ PARAMS '=> array (\ PDO: ATTR_CASE => \ PDO: CASE_NATURAL ),
This configuration makes the field names case insensitive. The table name is invalid.
I read the source code by myself. this is thinkphp which converts all table names to lowercase by default, opens them in uppercase, connects them with _, and changes them to lowercase.
I cannot find the configuration item about the configuration table name. So I started with the source code and removed the function that converts the code to lowercase, and removed the function that splits and reassembles the code. Finally, it can be used.
After so long, I posted my post on CSDN!