确定我有一个由几个变量PHP链接只有通过一个MySQL结果的一部分
<a href=\year.php? manufacturer='.$manufacturer.'&fuel_type='.$fuel_type.'&model_type='.$model_type.'>'.$model_type.'</a>
整个代码是很长的,因为它有很多分页的一个PHP链接,所以我只是包括基本查询和循环部分。
$query1 = "SELECT Distinct model_type from $tableName where manufacturer='$manufacturer' AND fuel='$fuel_type' LIMIT $start, $limit";
$result = mysql_query($query1);
然后我得到并显示结果的底部。
$count = 0;
$max = 2;
while($row = mysql_fetch_array($result))
{
$model_type = $row['model_type'];
$count++;
echo '<td class="manu"><div align="center">'.'<a href=\year.php? manufacturer='.$manufacturer.'&fuel_type='.$fuel_type.'&model_type='.$model_type.'>'.$model_type.'</a>'.'</div></td>';
if($count >= $max){
//reset counter
$count = 0;
//end and restart
echo '</tr><tr>';
}
}
现在这工作得很好,除了当我从它显示为1系列数据库模式类型变量,但是当它在这个环节只得到1和不拿起系列传递。
感谢
访问下一页您没有提供有效的PHP语法。很难知道,如果这是一个现有的字符串 – codingbiz
哪个是“模式类型”变量的一部分?什么是系列?你可以显示你的数据库查询吗?并给出一个错误的样本以及所需的URL。 – mario
可能是空白问题。你能发布完整的代码吗? – Mob