I currently have the following query. Which fetches all column names for a table. But when there are 2 tables with the same name (in different databases) it fetches those column names as well.
In the following query
$table of course means the requested table. In this case for example
select column_name from information_schema.columns where lower(table_name)=lower(\''.$table.'\')
So my question is: How do I specify which database the query should look into.