***EDITED BY O~Snapple PLEASE USE TAGS WHEN POSTING CODE***
So you are wanting to do "SELECT * FROM T% ORDER BY auto ASC" (where % is wild card). I am pretty sure you can't do that. Can you write some code to create they query dyncmially? First find out all the merchants tables you can want to search, like
PHP Code:
$merchants_from_part = "T100 t100, T200 t200"
than create
PHP Code:
$merchants_select_part = "t100.*,t200.*"
and than use
PHP Code:
$query_LISTALL = "SELECT ".$merchants_select_part." FROM ".$merchants_from_part ." ORDER BY auto ASC";
I must add this...what you mention above sounds like a bad design. Why not create a table with merchants ids and use the T100 table as the base table and add the merchants id column. One thing this could do is you improve lots of preformance while keeping your database normalized.