문제

I'm using version 4.1.13 of phpMyAdmin. Please consider the following table and data:

CREATE TABLE `test` (
  `testcol` mediumint(6) NOT NULL,
   PRIMARY KEY (`testcol`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `test` (`testcol`) VALUES ('1'), ('2'), ('3');

The following query seems to return wrong results:

SELECT CONCAT(testcol), testcol FROM `test` WHERE 1;

CONCAT(testcol)   testcol
---------------   -------
             31         1
             32         2
             33         3

Am I doing something wrong here or is this a PMA bug? Running the query directly in MySQL's command-line client returns the expected results.

The results should be:

CONCAT(testcol)   testcol
---------------   -------
              1         1
              2         2
              3         3
도움이 되었습니까?

해결책 2

Apparently version 4.1 requires MySQL version 5.5+

다른 팁

try this:

SELECT CONCAT(testcol), testcol FROM `test` WHERE testcol=1;

result:

CONCAT(testcol)   testcol
---------------   -------
             31         1
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top