Sorry! I thought you were trying to get the table names with phone number fields, you should be able to get the content of the phone number field like this:
<?php $firstTable = true;?>
<?php foreach (getSchemaTables() as $tableName) :?>
<?php if(strpos($tableName, "_main")): ?>
<?php $schema = loadSchema($tableName); ?>
<?php if(@$schema['phone']): ?>
<?php if($firstTable) {
$firstTable = false;
}
else {
echo "UNION";
}
?>
SELECT `phone` as "Phone Numbers" FROM `<?php echo $TABLE_PREFIX;?><?php echo $tableName;?>`
<?php endif; ?>
<?php endif ?>
<?php endforeach ?>
So I've updated the code to select the phone number field from each table.
Let me know if the code doesn't work.
Thanks!
Greg
Greg Thomas
PHP Programmer - interactivetools.com