php-sql-smarty pagination
问题 I have the following code : $gemng = $db->query("SELECT * FROM students ORDER BY student_name ASC "); while($ftmng = $db->fetch_array($gemng)) { $magn[] = $ftmng; } $tpl->assign('mn', $magn); $db->free_result($gemng); I want to display a result with only 20 student not more than that. and display others in pages. how can I do that ... can you fix the code and add the pagination code to it ? do not worry about the html file I will take care of it 回答1: Here's a simple tutorial on how to code it