これに関連する人物の名前に対応するデータベースに合計値を記録しています:
$sql = "SELECT distinct instr from table"; //instr is the name of the person in this case
$q = $db->prepare($sql);
$q->execute();
while($row = $q->fetch()){
//the rest of the stuff
}
これは常に正常に動作しているように見えましたが、今日、「ケイトリン」に対して 2 つの別々の数値セットが一緒に返されていることに気付きました。ここにphpmaのクエリのスクリーンショットがあります
何が原因でしょうか?