From that message, I would assume the SESSIONS_TABLE string has been altered. It should read 'SELECT * FROM phpbb_sessions' the phpbb_sessions string is inserted by the SESSIONS_TABLE variable, if it reads something like SESSION_TABLE or someone removed the space between this and the WHERE statement so it says SESSIONS_TABLEWHERE it will return blank, and you will get 'SELECT * FROM ', which will cause a syntax error as there is no null table.
The fact that the default phpbb comes out with column names rather than * as a selection criteria probably means someone has altered it incorrectly.