如何在 PHP 中对 SHOW TABLES 查询的结果应用分页

2022-01-04 00:00:00 php mysql pagination

我想对 SHOW TABLES FROM DATABASE_NAME 的结果应用分页.

I would like to apply pagination to the results of SHOW TABLES FROM DATABASE_NAME.

尝试使用 LIMIT 关键字,但抛出错误.

Tried using the LIMIT keyword but an error is thrown.

分页是指查询返回的结果(表格)将显示在多个页面上.

By pagination I mean that the result(tables) returned by the query is to be displayed on multiple pages.

推荐答案

您可以使用不同的查询代替(实现表的名称),例如:

you can use the different query instead (an achieve the names of the tables) like:

    SELECT TABLE_NAME FROM information_schema.TABLES 
WHERE `TABLE_SCHEMA` = 'my_db_name' LIMIT 10

相关文章