Google dot what?
Posts: 2
16 credits Members referred : 0
« on: Dec 02, 2007, 04:30:55 PM »
Hi Olaf. thanks for sharing this class. I am new in DB and PHP and this class made my life easier.
I just download the recent version (yesterday I set ed up the one in PHPClasses) and found a problem. The records (as per example) wasn't displaying well. So I changed the funcion page_info as follows:
You can see the "to" parameter was causing this internal string $str not working fine (unless I made some mistake somewhere else (most probably). I changed the internal parameter name to str1 (in order to not modify anything else) and add the $str as direct assignment inside the function.
Just to share this.
Regards,
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6309
38674 credits Members referred : 374
It's time to use PHP5!
« Reply #1 on: Dec 02, 2007, 11:56:48 PM »
is this based on the latest version from my website?
I have this (working) function:
Code:
// this info will tell the visitor which number of records are shown on the current page function page_info($str = "Result: %d - %d of %d") { $first_rec_no = ($this->set_page() * $this->rows_on_page) + 1; $last_rec_no = $first_rec_no + $this->rows_on_page - 1; $last_rec_no = ($last_rec_no > $this->get_total_rows()) ? $this->get_total_rows() : $last_rec_no; $info = sprintf($str, $first_rec_no, $last_rec_no, $this->get_total_rows()); return $info; }
the code on phpclasses.org is not the current version