MySql error when backing up and refreshing Schema

Permalink
When refreshing Schema I get the following error message…

Fatal error: Call to a member function getPackageHandle() on a non-object in /home/sites/cheshirebrides.co.uk/public_html/updates/concrete5.4.0.5/concrete/models/block_types.php on line 401

and when i try to back up the database I get this message…

An unexpected error occurred.
mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-alistair' at line 1] in EXECUTE("SHOW TABLES FROM web131-alistair")


Hope someone can help me fix this issue

JonRimmer
 
jjdb210 replied on at Permalink Reply
jjdb210
I'm pretty certain the problem is coming from the fact that there is a hyphen in your table name, and the table name isn't enclosed in ` `...

That said, the easiest workaround-solution I can come up with is to rename the database to not have a hyphen, and change your config.php file to match the new database name.

Otherwise, there probably is a code fix needed...
JonRimmer replied on at Permalink Reply
JonRimmer
Thanks for your thoughts but I dont think I can change the name of the database in cpanel, it seems to force me to use this style of naming. If you have any other ideas I would be very grateful for the help
Thanks again