Главная  /  MySQL  /

MySQL - Количествo строк в таблице

    <?php
    include "../init.php";
    $table="studio";
    $query = mysql_query("SELECT count(*) FROM $table");
    $row = mysql_fetch_row($query);
    $total = $row[0]; // всего записей
    echo $total;
    ?>