Hello,
I'm using the MyPagina class. I'd like to change the number of items per page I'm displaying. Right now I am simply displaying the default 4 items per page.
This is what my code looks like:
$myGallery = new MyPagina;
$myGallery->sql = "SELECT * FROM galleries WHERE category LIKE '%".$category."%' ORDER BY date DESC";
$result = $myGallery->get_page_result();
$myGallery->rows_on_page=6;
$num_rows = $myGallery->get_page_num_rows();
$nav_links = $myGallery->navigation(" | ", "currentStyle");
$nav_info = $myGallery->page_info("to");
$simple_nav_links = $myGallery->back_forward_link();
$total_recs = $myGallery->get_total_rows();
$p=0;
while($p<$myGallery->rows_on_page)
{
$row = mysql_fetch_row($result);
$p++;
//Display my item
}
However, while it does go through the while loop 6 times, it does not retrieve 6 items. It only retrieves 4. But changing the below line will affect the number of pagination links displayed (the forward and back links).
$myGallery->rows_on_page=6;
So, how can I get my page to display all 6 of the items I want it to display? I have the pagination links displaying properly.
TIA.