Title: Error when dropping tables
Last modified: August 30, 2016

---

# Error when dropping tables

 *  Resolved [cartpauj](https://wordpress.org/support/users/cartpauj/)
 * (@cartpauj)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/error-when-dropping-tables/)
 * When trying to drop tables, I’m getting this error:
 *     ```
       Warning: array_map() expects parameter 1 to be a valid callback, function 'table' not found or invalid function name in /var/www/site/wp-content/plugins/adminer/inc/adminer/drivers/mysql.inc.php on line 731
   
       Warning: implode(): Invalid arguments passed in /var/www/site/wp-content/plugins/adminer/inc/adminer/drivers/mysql.inc.php on line 731
       ```
   
 * Plus this shows up on top of it: [http://cspf.co/buBw/Image%202015-07-08%20at%209.05.22%20PM.png](http://cspf.co/buBw/Image%202015-07-08%20at%209.05.22%20PM.png)
 * Yes, I do have WP_DEBUG enabled.
 * [https://wordpress.org/plugins/adminer/](https://wordpress.org/plugins/adminer/)

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

 *  [Navjot Singh](https://wordpress.org/support/users/navjotjsingh/)
 * (@navjotjsingh)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/error-when-dropping-tables/#post-6310809)
 * Getting the same error.
 *  [Matt Biscay](https://wordpress.org/support/users/skyminds/)
 * (@skyminds)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/error-when-dropping-tables/#post-6310815)
 * Hi,
 * I’m experiencing the same issue – tables cannot be dropped in version 1.4.2.
 *  [Matt Lambert](https://wordpress.org/support/users/conversationware/)
 * (@conversationware)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/error-when-dropping-tables/#post-6310816)
 * Same here I think
 * When trying to drop tables I get
 * Syntax error near ” at line 1 12:37:27 SQL command
 * and the table is not dropped.
 *  [ecdltf](https://wordpress.org/support/users/ecdltf/)
 * (@ecdltf)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/error-when-dropping-tables/#post-6310821)
 * Same problem here.
 * The issue is in `/plugins/adminer/inc/adminer/drivers/mysql.inc` :
 * The function at line 730 should be changed from…
 *     ```
       function drop_tables($tables) {
       		return queries("DROP TABLE " . implode(", ", array_map('table', $tables)));
       	}
       ```
   
 * to…
 *     ```
       function drop_tables($tables) {
       		return queries("DROP TABLE " . implode(", ", array_map('adminer_table', $tables)));
       	}
       ```
   
 * The same issue seems to be in the `drop_views` function at line 722.
 * Tom
 *  [Matt Biscay](https://wordpress.org/support/users/skyminds/)
 * (@skyminds)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/error-when-dropping-tables/#post-6310822)
 * Thank you Tom, with the code change it’s now possible to drop tables. Very cool.
 *  Plugin Author [Frank Bueltge](https://wordpress.org/support/users/bueltge/)
 * (@bueltge)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/error-when-dropping-tables/#post-6310823)
 * Thanks for the help. I will include this in the next version.
 *  [ecdltf](https://wordpress.org/support/users/ecdltf/)
 * (@ecdltf)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/error-when-dropping-tables/#post-6310824)
 * Thanks for the update. Drop tables is working now, but drop views isn’t.
 * Probably the same problem? See my[ post above](https://wordpress.org/support/topic/error-when-dropping-tables?replies=7#post-7628954).
 *  Plugin Author [Frank Bueltge](https://wordpress.org/support/users/bueltge/)
 * (@bueltge)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/error-when-dropping-tables/#post-6310825)
 * Thanks a lot. I’m not see this on reading 🙁
    Now, it is changed and include 
   open topics on my local repository.

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

The topic ‘Error when dropping tables’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/adminer_efefef.svg)
 * [Adminer](https://wordpress.org/plugins/adminer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/adminer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/adminer/)
 * [Active Topics](https://wordpress.org/support/plugin/adminer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/adminer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/adminer/reviews/)

## Tags

 * [array_map()](https://wordpress.org/support/topic-tag/array_map/)
 * [implode](https://wordpress.org/support/topic-tag/implode/)

 * 8 replies
 * 6 participants
 * Last reply from: [Frank Bueltge](https://wordpress.org/support/users/bueltge/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/error-when-dropping-tables/#post-6310825)
 * Status: resolved