Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下のクエリでは、「zip」というフィールドの値が同じ行がいくつかあります。総行数ではなく、「zip」の一意の値を数えるにはどうすればよいですか?
$presult = mysql_query("SELECT COUNT(*) from submission ") or die(mysql_error());
SELECT COUNT(DISTINCT zip) AS unique_zip_cnt FROM submission