Ok I had another look at this, this evening and I am still struggling.
Here are the instructions in the datapager info:
the constructor:
$datapager->datapager($dbconnection, $query, $pagesize, $querytousetocountrecords);
the main function - executes the query and returns a mysql result id or 0 if it fails
$datapager->execute($pagesize, $pagenumber);
Now the code I am using is:
include("datapager.php");
$datapager->datapager($connection, $sql_result, $pagesize, $querytousetocountrecords);
$datapager->execute($pagesize, $pagenumber);
BUT I am getting the following error:
Fatal error: Call to a member function on a non-object in d:\apache\apache\htdocs\result.php on line 60
Can anyone advise me what I am doing wrong?