Msg#: 3617724 posted 12:39 am on Apr 3, 2008 (gmt 0)
I've got a MySQL database with a little over 400 tables in it. I'm writing a script that needs to access about ten of these. The trouble is that those ten tables have what you might call dynamic titles, meaning they're created by other scripts periodically. This means I can't just hard-code the table names into my current script.
The tables in question do follow a consistent naming scheme - specifically, a three-letter word (they share the same one), followed by a random, unique, nine-digit number. No other tables in the database share this naming pattern.
How can I use PHP to scan the database for all tables that fit that pattern, without causing too much overhead?