I have this working query that outputs URL and click counts from database.
<?php
$query = "SELECT *,count(*) FROM db_data WHERE ip GROUP BY data_url";
$sampleCount = mysql_query($query);
$result = mysql_query($query);
if($sampleCount > 0) {
while ($row =mysql_fetch_array($result)) {
$dataList_br .= '<div class="info_table">
<div class="info_table1">
<p>' .$row['data_url']. '</p>
</div>
<div class="info_table2">
<p>' .$row['count(*)']. '</p>
</div>
</div>';
}
} else {
$dataList_br .= '<p class="warning">No data found in database. Please contact admin.</p>';
}
This will output: "/somepath/index.php" and total count for example "24", and other sets of urls with total hit counts.
Question: How do I change URL output "/somepath/index.php" to the string name like "Page Name", instead of displaying URL.
Any help is greatly appreciated.