ebmigue Posted June 27, 2011 Share Posted June 27, 2011 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.