我尝试了4天关于制作分页系统的搜索,但我无法理解因特网上的任何代码,因为我是新手。如何使用PHP MySQLi制作分页系统面向对象
这里是我的代码:
$sql = "SELECT name_id, name FROM TABLE WHERE tag1 in ('$tag1') OR tag2 in ('$tag1') $andor tag2 in ('$tag2') OR tag1 in ('$tag2') ORDER BY rating desc LIMIT 5 OFFSET 0";
$result = $conn->query($sql);
分页的html代码:
<div class='pagination'>
<a>1</a>
</div>
我不知道该怎么办。你能向我解释这段代码吗?
的可能的复制[PHP分页与库MySQLi(http://stackoverflow.com/questions/26041382/php-pagination-with-mysqli) – GilZ