sford999 Posted November 10, 2006 Share Posted November 10, 2006 Hi,I`m trying to make a section in a script I`m building thats similar to the tool that phpmyadmin has.Basically I want to run the optimize query then display a table with the results such as the image below[img]http://www.carpfishinguk.net/opt.jpg[/img]I`ve tried searching google for an answer to no avail.Can anyone point me in the right direction or give me some pointers on how to do this?Thanks Link to comment https://forums.phpfreaks.com/topic/26853-phpmyadmins-optimize-tool/ Share on other sites More sharing options...
Monkeymatt Posted November 10, 2006 Share Posted November 10, 2006 when you mysql_fetch_assoc($result) of that query, you should get values that look similar to theirs - array keys are Table, Op, Msg_type, and Msg_text, and array values are the other values in the table.Monkeymatt Link to comment https://forums.phpfreaks.com/topic/26853-phpmyadmins-optimize-tool/#findComment-122862 Share on other sites More sharing options...
sford999 Posted November 11, 2006 Author Share Posted November 11, 2006 I`ve tried using the "Table, Op, Msg_type, and Msg_text" array keys, but they just turn up blank.I tried echo/print_r and still nothingAnyone have any ideas what these keys might be? Link to comment https://forums.phpfreaks.com/topic/26853-phpmyadmins-optimize-tool/#findComment-123009 Share on other sites More sharing options...
Monkeymatt Posted November 11, 2006 Share Posted November 11, 2006 It works for me:[code]mysql_connect(db_host, db_username, db_password);mysql_select_db(db_database);$result=mysql_query("OPTIMIZE TABLE `v2_settings`");var_dump(mysql_fetch_assoc($result));[/code]outputs: (I have xdebug enabled)[quote]array 'Table' => 'ekinboard.v2_settings' (length=21) 'Op' => 'optimize' (length=8) 'Msg_type' => 'status' (length=6) 'Msg_text' => 'OK' (length=2)[/quote]Monkeymatt Link to comment https://forums.phpfreaks.com/topic/26853-phpmyadmins-optimize-tool/#findComment-123035 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.