JackTheRussel
Programmer
Hi.
I need to get information from database tables.
I try to get part of information which I get when I run commands:
result:
Name: table1
Engine: InnoDB
Version: 10
Row_format: Compact
Rows: 1
Avg_row_length: 11255
Data_length: 15584
Max_data_length: 0
Index_length: 102
Data_free: 0
Auto_increment: 2
Create_time: 2006-12-12 13:16:51
Update_time: NULL
Check_time: NULL
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment: InnoDB free: 341502 kB
Then table2... etc..
Which would be the smarters way to get these informations:
Name: table1
Engine: InnoDB
Size: #Size is Data_length: 15584 + Index_length: 102
Create_time: 2006-12-12 13:16:51
Where should I read these informations? to the table? hash?
What I try to do is a program, which would first read all databases into table and then one by one take table information from current database:
pseudocode:
I need to get information from database tables.
I try to get part of information which I get when I run commands:
Code:
mysql>use database1;
mysql>show table status;
Name: table1
Engine: InnoDB
Version: 10
Row_format: Compact
Rows: 1
Avg_row_length: 11255
Data_length: 15584
Max_data_length: 0
Index_length: 102
Data_free: 0
Auto_increment: 2
Create_time: 2006-12-12 13:16:51
Update_time: NULL
Check_time: NULL
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment: InnoDB free: 341502 kB
Then table2... etc..
Which would be the smarters way to get these informations:
Name: table1
Engine: InnoDB
Size: #Size is Data_length: 15584 + Index_length: 102
Create_time: 2006-12-12 13:16:51
Where should I read these informations? to the table? hash?
What I try to do is a program, which would first read all databases into table and then one by one take table information from current database:
pseudocode:
Code:
get database names into @databases table.
for ($i=0; $i<@databases; $i++){
use $database[$i];
show table status;
get intresting information into table/hash/?
}