MySQL syntax for joins mixed with commas has changed. See http://bugs.mysql.com/bug.php?id=15823.
This affects ui_lists.inc, that I've found so far, and can be fixed by surrounding the comma-separated fields with parenthesis. For example, in function gl_all_accounts_list on line 1381, change
FROM ".TB_PREF."chart_master,".TB_PREF."chart_types LEFT JOIN ".TB_PREF."bank_accounts ON ".TB_PREF."chart_master.account_code=".TB_PREF."bank_accounts.account_code
to
FROM (".TB_PREF."chart_master,".TB_PREF."chart_types) LEFT JOIN ".TB_PREF."bank_accounts ON ".TB_PREF."chart_master.account_code=".TB_PREF."bank_accounts.account_code