Am having a hard time printing all record percent in my db

my sql statement

$query="SELECT *, duedate,(TO_DAYS(duedate) - TO_DAYS(CurDate())) as difference FROM vehicle_info ORDER by svreg";
				
//$query="SELECT * FROM vehicle_info WHERE id='$id' ORDER by vreg";
	$pager = new PS_Pagination($conn,$query,10,10);
	$accra = $pager->paginate();
	while($row = mysql_fetch_assoc($accra)) 
	{
	$id = $row['id'];
	$ymodel = $row['ymodel'];
	$make = $row['make'];
	$chassis = $row['chassis'];
	$color = $row['color'];
	$driver = $row['driver'];
	$svreg = $row['svreg'];
	$engine = $row['engine'];
	$trans = $row['trans'];
	$tsize = $row['tsize'];
	$fleet_no = $row['fleet_no'];
	$axles = $row['axles'];
	$company = $row['company'];
	$account = $row['account'];
	$premium = $row['premium'];
	$duedate = $row['duedate'];
	$dvla_date = $row['dvla_date'];
	$intax_date = $row['intax_date'];
	$cur_date = $row['cur_date'];
	$numDays = $row['difference'];
								}

I want to select all archives in

vehicle_info

and print all at once.

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.