From 7e660e939963450f8805d718c50802fc54ea9d25 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 19 Jul 2016 16:14:04 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20de=20'states/getByIdChip'=20car=20?= =?UTF-8?q?la=20liste=20'pin=5Fvalues'=20=C3=A9tait=20dans=20le=20d=C3=A9s?= =?UTF-8?q?ordre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/repo/state.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manager/repo/state.php b/manager/repo/state.php index 2dca7c5..f9891c0 100644 --- a/manager/repo/state.php +++ b/manager/repo/state.php @@ -20,8 +20,8 @@ */ public static function getForChip($id_chip){ - $req = Database::getPDO()->prepare("SELECT s.state, pm.id_chip, GROUP_CONCAT(s.value) as pin_values - FROM state as s, (SELECT * FROM pin_merge ORDER BY pin ASC) as pm + $req = Database::getPDO()->prepare("SELECT s.state, pm.id_chip, GROUP_CONCAT(s.value ORDER BY pm.pin ASC) as pin_values + FROM state as s, pin_merge as pm WHERE s.id_pin_merge = pm.id_pin_merge AND pm.id_chip = :id_chip GROUP BY s.state, pm.id_chip");