Apparently version 4.1 requires MySQL version 5.5+
phpMyAdmin wrong results when using CONCAT
-
04-07-2023 - |
Question
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
Solution 2
OTHER TIPS
try this:
SELECT CONCAT(testcol), testcol FROM `test` WHERE testcol=1;
result:
CONCAT(testcol) testcol
--------------- -------
31 1
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow