$result = mysql_query("SELECT * FROM videos WHERE user_id = '1'")
or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
$file = ''.$row['id'].'.flv';
$path_file = $path.'/'.$file;
$size = filesize($path_file);
}
This is your code If the above code is not working for You you can take the size of all file in array like the below and just use the array_sum() to get the size of total file
$result = mysql_query("SELECT * FROM videos WHERE user_id = '1'")
or die(mysql_error());
$total_size = array();
while($row = mysql_fetch_array( $result )) {
$file = ''.$row['id'].'.flv';
$path_file = $path.'/'.$file;
$total_size[] = $size = filesize($path_file);
}
$sum_of_filesize = array_sum($total_size);
This will help You