phpBB Error wrote:SQL Error : 1146 Table 'database.TABLE_NAME' doesn't exist
While it appears similar to the first error we looked at above, this message represents an entirely different kind of problem. Notice that TABLE_NAME here is written in all capital letters; this is how you know the error message is different. In phpBB coding, it is a convention that constants, which represent unchangeable values, are written completely in uppercase. An example is USERS_TABLE, which is the constant representing the name of your users database table (the name is your table prefix plus the word "users"). This convention is also used in a lot of broader PHP coding.
When PHP encounters something in a script that it believes is a constant, but cannot find a defined value for that constant, the literal meaning becomes the value of the constant. To put it more simply, if the constant TABLE_NAME is not defined, then the value is assumed to be "TABLE_NAME" when used. The error occurs because there is no database table with this name (note that table names are usually case sensitive and constant names are usually different than actual table names).
In order to fix this error, you need to define a constant. When you're installing a hack and you encounter this error, it'll usually be a result of not making an edit to includes/constants.php or accidentally deleting something in that file. Typically, editing constants.php according to the hack's instructions (or restoring what you accidentally deleted) will define the constant.
Sometimes this error message may also appear in another form containing a SQL query like the one below.
phpBB Error wrote:SELECT * FROM TABLE_NAME