I have seen this done before but i can't remember where i saw it.
What i need to do is have the table name as a field in a query
Say i have a table called users, how would i add the table name 'users' as a column
like
SELECT username, password, **table** as mytable FROM users