Jump to content

need help select * tables in db


seany123

Recommended Posts

All right, then. I'll take my shot.

 

Say you have 10 such tables, then:

 

$cnt = 10;
for($i = 1; $i <= $cnt; $i++){
   $tables[] = "SELECT * FROM table{$i}_episodes;"
}

$query = "SELECT * FROM (" . implode(" UNION ", $tables) . ")x";

//execute $query..
//loop through the results. and perform your validation.

//or you could modify the query to perform the validation on the database server...

 

Hope it helps.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.