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. Link to comment https://forums.phpfreaks.com/topic/240165-need-help-select-tables-in-db/page/2/#findComment-1235290 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.