特定の範囲のアイテムの詳細を表示するステートメントがあります。すべての詳細は、このように同じであると思われます..
 id | color |  shape | material |
----------------------------
 i45 | blue  | square | plastic  |
 i46 | blue  | square | plastic  |
 i47 | blue  | square | plastic  |
ただし、範囲がそのように適切に定義されていない場合:
id | color |  shape | material |
 ----------------------------
i45 | blue  | square | plastic  |
i46 | blue  | square | plastic  |
i47 | blue  | square | plastic  |
i48 | red   | square | plastic  |
他とは異なる値を持つ列名を返すクエリが必要です。列名がポップアップ ウィンドウに表示されます。現時点では次のステートメントがあります。
$chk = "SELECT DISTINCT
    color,
    shape,
    material,
FROM $table 
WHERE  id BETWEEN $StartID AND $EndID";
$res = mysqli_query($con, $chk) or die (mysqli_error($con));
$r = mysqli_num_rows($res);
if ($r > 1)
<script language="JavaScript">alert ("Some fields have different data")</script>
異なる値がある場合にのみ検出されます..しかし、私は異なる値を持つ列名を取得する方法にスタックしています..助けてください..