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.
mysql_num_rows なしでデータベース内の投稿数をカウントするには?
私はこれを使用しています:
$post_query = mysql_query("SELECT * FROM posts WHERE user='$user'"); $number = mysql_num_rows($post_query);
しかし、mysql_num_rows は投稿が 0 件の場合でも常に 1 を返しますか? 投稿が0件の場合に0を返すものが必要です。