Seach

how to count number of data in a table using oops in php

public function count_data($table)
{
   
    $query="SELECT * FROM $table";
    $result=$this->execute_query($query);
    return @mysql_num_rows($result);   
}