Jump to content

Size of Table

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
dirkfirst

dirkfirst

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 354 posts
how can i get a size of a table in bytes , anyone knows ??

#2
Crane

Crane

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 398 posts

$sql = "SHOW TABLE STATUS";

$result = mysql_query($sql);

while($row = mysql_fetch_array($result))

{

            $total = $row['Data_length']+$row['Index_length'];

}

echo($total);



#3
Lop

Lop

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,172 posts
Should work perfect. Did you get this working?