CFROG 9 Posting Pro in Training

I'm working on a script that lists the number of additional records associated with a record id and returns the number as well as a link to each additional record. It works fine for the first record ... it tells me "4 additional records: and lists the links 1, 2, 3, . When I click the link it brings up the desired record but now says there are zero additional records and there are no links. The pages are identical. The only thing that changes is the search criteria I pass through the URL. Here is the code:

$sql3="SELECT * FROM xinfo WHERE identify='$recordid' AND plus_one IS NOT NULL" or die(mysql_error());
						$result3=mysql_query($sql3);
						$num3=mysql_num_rows($result3);
						
						echo " $num3 Additional Reports";
						
						while($row3=mysql_fetch_array($result3))
						{
						$addreport=$row3['plus_one'];
						$addid=$row3['id'];
						
												
						 echo" <a href=\"search.php?id=$addid\"> $addreport , </a> ";
							 }

Any ideas?

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.