我像这样从 mytable 查询。
我想把它放在数组(PHP)中并像这样搜索
$index = 15;
$result = array_search(...)..); <--- age_range
并将该行($result)放入我创建的新数组中;或者有人有更好的主意。对不起一些愚蠢的问题。感谢您的帮助。
询问
SELECT
CONCAT(2 * FLOOR(age / 2), '-', 2 * FLOOR(age / 2) + 5) AS 'age_range',
SUM(gload1) AS 'g1',
SUM(gload2) AS 'g2',
SUM(gload3) AS 'g3',
SUM(gload4) AS 'g4',
SUM(gload5) AS 'g5',
SUM(gload6) AS 'g6',
SUM(gload7) AS 'g7',
SUM(gload8) AS 'g8',
SUM(gload9) AS 'g9',
SUM(gload10) AS 'g10'
FROM
member
GROUP BY 1
ORDER BY age ;