Hi,
I have a strange situation to tackle.I have a paging for the website I am developing.
there are few records in the table which i want to skip from to display in my list in the web page.
But paging works on the total num rows as using mysql_num_rows(resultset)

Recommended Answers

All 4 Replies

if(isset($_REQUEST['page']) || $_REQUEST['page']==" ")
		 $pageindex = $_REQUEST['page'];
	else
		 $pageindex = 1;

	$Tourcnt=mysql_num_rows($sqlThingsToDo);

	$TotalPage = ceil($Tourcnt / $pagesize);
	
	if($pageindex == 1)
		$StartPage = 0;
	else
		$StartPage = ($pageindex -1) * $pagesize;
	if($pagesize*$pageindex < $Tourcnt)
		$EndPage = $pagesize * $pageindex;
	else
		$EndPage = $Tourcnt;

	$ResultPagiing = $dbConnection->query($qThingsToDo." LIMIT ".$StartPage.", ".$pagesize);

So here the problem is, it still shows the 9 records on a page if particular record is faulty and we are not showing it,but in the paging we get to see paging from records '11 to 20'
or in other words we are not able to exclude the record from fetching completely.
Is there anything we can manipulate mysql_fetch_array for any particular record depending upon its content or we can rearrange the paging considering the excluded record..?

multicoder,

This is java forum.

sory, i am leaning towards .. state, working on mulitple technologies!
Can anybody move it to PHP forum?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.