using LIKE is not the way to go either, because there is no guarantee of _ after each prefix... yes, i always DO use _, but it's not forced upon the admin at setup..

assume there are two db's 'ubbt' and 'ubbtest' (no underscore)..

the like will match both too if the query did "like ubbt%"

best way is to do an equality check on the actual prefix including the length..

ie:

Code
SHOW TABLE STATUS WHERE LEFT(Name,LENGTH('{$config['TABLE_PREFIX']}')) = '{$config['TABLE_PREFIX']}'

this should also handle the _ problem you had.. assumes latin1 charset (you may have different) wink

2c