What is the exact query you are running?
If you are using a table prefix, and are referencing the tablename as identifier for a columnname anywhere the SQL-statement, you should also add an AS clause. Example:
PHP Code:
SELECT table1.name, table2.*
FROM " . TABLE_PREFIX . "table1 AS table1
LEFT JOIN " . TABLE_PREFIX . "table2 AS table2 ON (table1.keyid = table2.keyid)