ok, sorry for misunderstanding.
At the moment i am using this codes to get the data from database. I use the first query to count the rows and second query to get the data.
I want to change this code to show dublicated entries. I don`t want to show all the data, I only want to show dublicates on topic field.
I want to count the rows where topic field has got the same entries and i want to show the rows where topic field has got the same value.
I hope i explained what i would like to do.
$query = "SELECT COUNT(*) as num FROM file";
$total_pages = mysql_fetch_array(mysql_query($query));
$total_pages = $total_pages[num];
/* Setup vars for query. */
$targetpage = $cat_name.'.php'; //your file name (the name of this file)
$limit = 20; //how many items to show per page
$page = $_GET['page'];
$start = ($page - 1) * $limit; //first item to display on this page
$start = 0; //if no page var is given, set start to 0
/* Get data. */
$sql = "SELECT * FROM file ORDER BY topic DESC LIMIT $start, $limit";
$result = mysql_query($sql);