Phpcms V9 commented on the bug.

Source: Internet
Author: User

When phpcms V9 is installed, if the database name contains uppercase letters, an error is returned when you post the second comment:

 
MySQL query: Create Table 'jq _ comment_data_1 '('id' int (10) unsigned not null auto_increment, 'commentid' char (30) not null default '', 'siteid' smallint (5) not null default '0', 'userid' int (10) unsigned default '0', 'username' varchar (20) default null, 'creat _ at' int (10) default 0, 'IP' varchar (15) default null, 'status' tinyint (1) default '0', 'content' text, 'direction' tinyint (1) default '0', 'support' Mediumint (8) unsigned default '0', 'reply' tinyint (1) not null default '0', primary key ('id '), key 'commentid' ('commentid'), key 'direction' ('direction'), key 'siteid' ('siteid'), key 'support' ('support ')) engine = MyISAM default charset = utf8; MySQL error: Table 'jq _ comment_data_1 'already existsmysql errno: 1050 message: Table 'jq _ comment_data_1' already existsneed help?

Because this table already existsProgramIf the returned result does not exist, let's take a look.Code:

 /*  ** Check whether the table exists * @ Param $ table name * @ return Boolean  */      Public   Function Table_exists ( $ Table  ){  $ Tables = $ This -> List_tables ();  Return   In_array ($ Table , $ Tables )? 1: 0 ;}  Public   Function  List_tables (){  $ Tables = Array  ();  $ This -> Execute ("show tables" );  While ( $ R = $ This ->Fetch_next ()){  $ Tables [] = $ R ['Tables _ in _'. $ This -> Config ['database' ];}  Return   $ Tables  ;} 

The field returned by executing show tables is "tables_in_whaleclub", the database name configured in my database is whaleclub, and the actual database name is whaleclub.
Solution: Do not use uppercase letters during installation. modify the configuration to lowercase letters to solve the problem.

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.