$sql="select * from tb_product ";
$result = mysql_query($sql) or die("Select Error");
$num_records = 20; //Amount of records per page
$record = mysql_num_rows(mysql_query("select * from tb_product where ref_id_type ='$id_type_select' order by ref_id_type ASC")); // Get amount of records
$result = mysql_query("select * from tb_product where ref_id_type='$id_type_select' order by ref_id_type ASC LIMIT ".(isset($_GET["start"])?$_GET["start"]:0).",".$num_records);
while ($rs=mysql_fetch_array($result)) {
$count++;
$result = mysql_query("select * from tb_product where ref_id_type='$id_type_select' order by ref_id_type ASC LIMIT ".(isset($_GET["start"])?$_GET["start"]:0).",".$num_records);
$rs=mysql_fetch_array($result);