thinkphp database table name case-sensitive problem

Source: Internet
Author: User
This is the code for my controller.
 
  Select ();        Var_dump ($a);        Die;        $this->display ();    }}

This is an error:
1146:table ' movierdc.praise ' doesn ' t exist [SQL statement]: SHOW COLUMNS from ' praise '
To declare, my table name is correct, there is a full lowercase table in the database, the query is normal. This first letter is not going to be capitalized.

Here are the methods that have been tried, useless
' Db_params ' = array (\pdo::attr_case = \pdo::case_natural),

Have you encountered a similar problem and how to solve it? Job!


Reply to discussion (solution)

There is no problem in Windows
It's hard to say in Linux.

' Db_params ' = array (\pdo::attr_case = \pdo::case_natural),

' Db_params ' = array (\pdo::attr_case = \pdo::case_natural),
This configuration is to make the field names case insensitive. The table name is not valid.

I read the source code myself, this is thinkphp by default, all table names are converted to lowercase, uppercase in uppercase, and concatenated with _, and uppercase letters are changed to lowercase.
I can't find the configuration item about the configuration table name. So I start directly from the source code, will be converted to lowercase function to remove, split the reorganization of the function is also removed. I can use it at last.

So long before csdn himself to the post knot!

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.