当结果数比总损失大一时输入正确,但从列表中减去一。例如:找到 12 个结果,但仅列出 11 个:
$goto = mysql_fetch_array($query);
$results = mysql_num_rows($query);
if($results == 1){
header('Location: movie.php?id='.$goto['id']);}
echo '<p><h2>Results for search "'.$_GET["search"].'": </h2></p>';
echo '<hr />';
echo "Found ".$total." result(s).</p><br>";
echo '<ol class="list">';
while ($resultado = mysql_fetch_assoc($query)) {
$titulo = $resultado['title'];
echo '<li>';
$link = 'http://localhost/lab/movie.php?id=' . $resultado['id'];
预先感谢您的帮助。