What does Can't find file: 'table_name' (errno: 2) mean?
Connect to your database and run the following:

show tables;


This will list all tables in the DB. Are the ones you are trying to query from in the list?