WordPress: [You have an error in your SQL syntax; check the manual that matches your MySQL server version for the right syntax to use near '-of-service ( ID
bigint(20) unsigned NOT NULL, number
TEXT, client
TE' at line 1]
This problem occurred twice with me, due to the fact that I used the hyphen (-) character when entering the table name in the form. WordPress stopped and due to this error it could no longer register any custom fields. I solved this problem by creating a function in the mb-custom-table-api.php class. Follow the small code below as a suggestion for improvement for this excellent plugin.
public static function create( $table_name, $columns, $keys = array() ) {
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
// prevents agains´t hyfhen put by mistake on form
if(strpos($table_name, '-')){
$text = str_replace('-', '_', $table_name);
$table_name = $text;
}
$sql = self::get_table_schema( $table_name, $columns, $keys );
dbDelta( $sql );
}