Excluding tables from SHOW TABLES FROM function

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
reecec
Forum Contributor
Posts: 218
Joined: Sun Apr 02, 2006 7:12 am

Excluding tables from SHOW TABLES FROM function

Post by reecec »

hi,

Is there any easy way to exclude a table from the list when I use the

Code: Select all

SHOW TABLES FROM
function.


Thanks Reece
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

http://dev.mysql.com/doc/refman/5.0/en/show-tables.html wrote:SHOW [FULL] TABLES [FROM db_name] [LIKE 'pattern']
you can formulate a "negative" regular expression to exclude the table.
reecec
Forum Contributor
Posts: 218
Joined: Sun Apr 02, 2006 7:12 am

Post by reecec »

what for use in php?

as i tryed this but recived an error.

Thanks reece
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

for use in your query... you can use regex in queries... it's dreadfully slow though so I've heard. (don't know for sure) and I imagine it wouldn't be such a big deal for tables as opposed to records where there could potentially (and reasonably) be millions.
Post Reply