MySQL number of Records.

Discussion in 'Web Design & Coding' started by Tabula Rasa, Jan 7, 2003.

  1. Tabula Rasa

    Tabula Rasa Stranger Than Kindness Political User

    Messages:
    3,233
    Location:
    Israel
    This is probably an easy question, but how do i get the number of Records in a mysql table with php?
     
  2. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    Well I guess this could work:
    PHP:
    $query "SELECT * FROM table";
    $getval mysql("database",$query);
    $number_of_rows mysql_numrows($getval);
     
  3. Tabula Rasa

    Tabula Rasa Stranger Than Kindness Political User

    Messages:
    3,233
    Location:
    Israel
    Thanks, i've allready maneged to find an answer , something like that

    Code:
    mysql_num_rows(mysql_query("SELECT * FROM table"))