Opret et nyt felt, der angiver kildetabellen i din SQL:
$sql="SELECT salehotel.*, 'salehotel' as source
FROM salehotel
UNION ALL
SELECT saleland.*, 'saleland' as source
FROM saleland
UNION ALL
SELECT salehouse.*, 'salehouse' as source
FROM salehouse
ORDER BY RAND()
LIMIT 6
";
Din PHP kan derefter vise denne kolonne som:
<?php echo $row['source']; ?>