There should be no problem with back-ticks around the table name: while they are not always needed, it never hurts to have them. However, if by any chance $TableMonth includes the database name in a "dot" format, e.g. "database.table", then it would break, as it would need to be database.table. Additionally, any external values being used in a query should be escaped, e.g. with the mysql_real_escape_string() function in this case (uh-oh, is that a herd of vicious kittens I hear approaching?).