View Single Post
  #2 (permalink)  
Old 07-31-2008, 08:45 PM
curtiss's Avatar
curtiss curtiss is offline
Moderator
 
Join Date: May 2003
Posts: 1,468
Please keep in mind that I have not used or tested the code you provided, so I am only going on what I can see from reading the code.

However, it appears that you will need to run the sql query and retrieve the recordset array before instantiating the classes.

The fetchPagedRow function does not accept any parameters, so there is no point in trying to call it with your SQL query.

I think what you need to do is something like:
PHP Code:
if($result mysql_query($query)) {
$tmparr = array();
while(
$rs mysql_fetch_assoc($result)) {
$tmparr[] = $rs;
}
}
$page $_GET['page'];
$pagedResults = new Paginated($tmparr,10,$page);
while(
$row $pagedResults->getPagedRow()) { 
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote