ねえ、私はあなたにアイデアだけを与えています:
リンクがあるテーブル リンクと列名もリンクがあると考えてください。
まず、html で直接 php を使用します。
INDEX.HTML
<html>
<head>
<script type="text/javascript" src="jquery.js">
<script type="text/javascript">
$(document).ready( function() {
$("#more").click( function() {
var get = document.getElementsByClassName('num');
var numberofget = "limitnext="+get.length;
$.ajax({
type : "POST",
url : "more_results.php",
data : numberofget,
cache : false,
success : function(html){
$(this).remove();
$("#results").append(html);
}
});
});
});
</head>
<body>
<div id="results">
<?php
include("db.php");
$query1 = "SELECT * FROM Links LIMIT 0 , 20";
$query2 = "SELECT * FROM Links";
$result1 = mysql_query($query1);
$result2 = mysql_query($query2);
$count = mysql_num_rows($result2);
while($rows=mysql_fetch_array($result1)){
$links=$rows['links'];
echo "<div class='num'>".$links."</div>";
}
if($count>=20){
echo "<a id='more' href='#'>More Results of Links</a>";
}
?>
</div>
</body>
</html>
more_results.php
<?php
include "db.php";
$limit=$_POST['limitnext'];
$limitaddup=$_POST['limitnext']+20;
$query1 = "SELECT * FROM Links LIMIT ".$limit." , ".$limitaddup.";
$query2 = "SELECT * FROM Links";
$result1 = mysql_query($query1);
$result2 = mysql_query($query2);
$count = mysql_num_rows($result2);
while($rows=mysql_fetch_array($result1)){
$links=$rows['links'];
echo "<div class='num'>".$links."</div>";
}
if($count>=$limitaddup){
echo "<a id='more' href='#'>More Results of Links</a>";
}
?>