[PHP] Setting total db size to a variable.
I have a question in regards to finding the total db size and setting it to a variable. How would I go about this?
Re: [PHP] Setting total db size to a variable.
Jason Martyn [EMAIL PROTECTED] wrote: I have a question in regards to finding the total db size and setting it to a variable. This is rather vague in several aspects. Please expand on your question with more details, otherwise it makes it hard to help with with your question. How would I go about this? Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Setting total db size to a variable.
Hello, This is a reply to an e-mail that you wrote on Sun, 20 Jul 2003 at 00:42, lines prefixed by '' were originally written by you. I have a question in regards to finding the total db size and setting it to a variable. How would I go about this? For mysql this will do the trick... $info = mysql_fetch_array(mysql_query(show table status from $databasename = '$tablename')); $sizeinMB = $info[Data_length]/1024/1024; -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Setting total db size to a variable.
From: Curt Zirzow [EMAIL PROTECTED] I have a question in regards to finding the total db size and setting it to a variable. This is rather vague in several aspects. Please expand on your question with more details, otherwise it makes it hard to help with with your question. I think he wants to get the size of a database, and setting that value to a variable... Probably the question is not regarding on how to set the value to a variable, but on how to get the database size, which surelly depends on the RDBMs you are using (if it can be done, no idea..) :oP regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] Setting total db size to a variable.
Theres a problem with the SQL query. It fails? I tried removing the = '$tablename' however, then the mysql_fetch_array cannot save the result set. I guess my basic question is how do I query the SHOW TABLE STATUS for a specific table in a specific database. -- Forgot to post this earlier -- My apologies. There are 2 databases. The admin database and the registrant info database. I would like to be able to be able to calculate the size of the combined databases and use them as a statistic. In the first database there is 5 tables, and in the other database there are 2 tables. I'm using MySQL V. 4.0 and PHP V. 4.3. -- Jay - Original Message - From: David Nicholson [EMAIL PROTECTED] To: Jason Martyn [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, July 19, 2003 5:51 PM Subject: Re: [PHP] Setting total db size to a variable. Hello, This is a reply to an e-mail that you wrote on Sun, 20 Jul 2003 at 00:42, lines prefixed by '' were originally written by you. I have a question in regards to finding the total db size and setting it to a variable. How would I go about this? For mysql this will do the trick... $info = mysql_fetch_array(mysql_query(show table status from $databasename = '$tablename')); $sizeinMB = $info[Data_length]/1024/1024; -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Setting total db size to a variable.
* Thus wrote Jason Martyn ([EMAIL PROTECTED]): I have a question in regards to finding the total db size and setting it to a variable. How would I go about this? http://www.mysql.com/doc/en/SHOW_TABLE_STATUS.html Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php