ThingEngineer / PHP-MySQLi-Database-Class

Wrapper for a PHP MySQL class, which utilizes MySQLi and prepared statements.
Other
3.29k stars 1.35k forks source link

Pagination and join #948

Open Brecht272727 opened 3 years ago

Brecht272727 commented 3 years ago

How can i use the pagination with a join?

$page = 1; $db->pageLimit = 2; $db->join("recept_types rt", "rt.id=r.typeid", "INNER"); **$products = $db->paginate("products", $page);_** echo "showing $page out of " . $db->totalPages;

How can i change the italic part?

themonk30 commented 3 years ago

Did you ever manage to do this, I want to do the same?

pollux commented 2 years ago

Can't you just use the fluent api for this?

$result = $database->objectBuilder()->join(...)->paginate(...);

Works fine for me with version 2.9.3 on PHP 7.4