<?
$sql1="SELECT table_name FROM tables";
$res1=mysql_query($sql1,$conn) or die(mysql_error());
while($row1=mysql_fetch_array($res1))
{
$sql2="SELECT * FROM ".$row1['table_name']." WHERE (SOME CONDITION)";
$res2=mysql_query($sql2);
while($row2=mysql_fetch_array($res2))
{
echo($row2['something']."<br />\n");
}
}
?>
Something like this? Do you have the column names stored in this table? if not how do you propose to make the condition because I assume the different tables are going to have different column names. Unless you do a describe on each table before you run the query. Seems a little loose though.
Hope this Helps
Rob