Title: 2.8.1 not working
Last modified: August 21, 2016

---

# 2.8.1 not working

 *  Resolved [lenker](https://wordpress.org/support/users/lenker/)
 * (@lenker)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/281-not-working/)
 * I installed 2.8.1 and the Plugin stopped working:
 * first Problem
    the tables under EXCLUDE DATABASE TABLES FROM OPTIMIZATION: CHECKED
   TABLES WON’T BE OPTIMIZED! are not there (this is not a problem for me)
 * second Problem
    The revisions are not deleted and in both screens there comes
   the error message:
 * Warning: mysql_query(): No such file or directory in …/wp-content/plugins/rvg-
   optimize-database/rvg-optimize-db.php on line 355
    Warning: mysql_query(): A 
   link to the server could not be established in …/wp-content/plugins/rvg-optimize-
   database/rvg-optimize-db.php on line 355 Warning: mysql_fetch_array() expects
   parameter 1 to be resource, boolean given in …/wp-content/plugins/rvg-optimize-
   database/rvg-optimize-db.php on line 357
 * I changed the code in rvg-optimize-db.php on line 355 and 1352 to the previous
   one and the second problem ist gone.
    (the first one not)
 * [https://wordpress.org/plugins/rvg-optimize-database/](https://wordpress.org/plugins/rvg-optimize-database/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Contributor [cageehv](https://wordpress.org/support/users/cageehv/)
 * (@cageehv)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/281-not-working/#post-5148083)
 * Hey Lenker,
 * Thanks for your feedback!
 * What did you change lines 355 and 1352 back too?
 * I will look into it asap.
 * peace,
    Rolf
 *  Thread Starter [lenker](https://wordpress.org/support/users/lenker/)
 * (@lenker)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/281-not-working/#post-5148162)
 * Hi,
 * I changed on line 355 this:
 *     ```
       # v2.8.1
       	$res = mysql_query("SHOW TABLES FROM <code>&quot;.DB_NAME.&quot;</code>");
       	$tables = array();
       	while($row = mysql_fetch_array($res, MYSQL_NUM)) $tables[] = "$row[0]";
       ```
   
 * to this
 *     ```
       to this
       	# v2.7.8
       	$names = $wpdb->get_results("SHOW TABLES FROM <code>&quot;.DB_NAME.&quot;</code>");
       	$dbname = 'Tables_in_'.DB_NAME;
       ```
   
 * and on line 1352 this
 *     ```
       # v2.8.1
       	$res = mysql_query("SHOW TABLES FROM <code>&quot;.DB_NAME.&quot;</code>");
       	$tables = array();
       	while($row = mysql_fetch_array($res, MYSQL_NUM)) $tables[] = "$row[0]";
   
       	$cnt    = 0;
       	for ($i=0; $i<count($tables); $i++)
       	{
       		$excluded = get_option('rvg_ex_'.$tables[$i]);
   
       		if(!$excluded)
       		{	# TABLE NOT EXCLUDED
       			$cnt++;
       			$query  = "OPTIMIZE TABLE ".$tables[$i];
       			$result = $wpdb -> get_results($query);
       ```
   
 * to this
 *     ```
       # v2.7.8
       	$names  = $wpdb->get_results("SHOW TABLES FROM <code>&quot;.DB_NAME.&quot;</code>");
       	$dbname = 'Tables_in_'.DB_NAME;
       	$cnt    = 0;
       	for ($i=0; $i<count($names); $i++)
       	{
       		$excluded = get_option('rvg_ex_'.$names[$i]->$dbname);
   
       		if(!$excluded)
       		{	# TABLE NOT EXCLUDED
       			$cnt++;
       			$query  = "OPTIMIZE TABLE ".$names[$i]->$dbname;
       			$result = $wpdb -> get_results($query);
       ```
   
 *  Plugin Contributor [cageehv](https://wordpress.org/support/users/cageehv/)
 * (@cageehv)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/281-not-working/#post-5148179)
 * Hi Lenker,
 * Thanks for the info!
 * peace,
    Rolf
 *  Plugin Contributor [cageehv](https://wordpress.org/support/users/cageehv/)
 * (@cageehv)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/281-not-working/#post-5148285)
 * Hey All,
 * I just released v2.8.2 of the plugin.
    The table name issue finally should be
   resolved with this new version.
 * Please try it and let me know if it works or not! Thanks!
 * peace,
    Rolf
 *  Thread Starter [lenker](https://wordpress.org/support/users/lenker/)
 * (@lenker)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/281-not-working/#post-5148313)
 * Hey,
    new release works as expected. Thanks
 *  Plugin Contributor [cageehv](https://wordpress.org/support/users/cageehv/)
 * (@cageehv)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/281-not-working/#post-5148314)
 * Hey Lenker,
 * Thanks for the feedback, glad it works now!
 * peace,
    Rolf

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘2.8.1 not working’ is closed to new replies.

 * ![](https://ps.w.org/rvg-optimize-database/assets/icon-256x256.png?rev=3350597)
 * [Optimize Database after Deleting Revisions](https://wordpress.org/plugins/rvg-optimize-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/rvg-optimize-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/rvg-optimize-database/)
 * [Active Topics](https://wordpress.org/support/plugin/rvg-optimize-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rvg-optimize-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rvg-optimize-database/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [cageehv](https://wordpress.org/support/users/cageehv/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/281-not-working/#post-5148314)
 * Status: resolved