我创建了一个问题
Here我觉得有点臃肿.要理解这个问题,我的要求是:
我需要创建3个mySQL查询来获取该行中的所有信息,以便我可以将信息格式化为HTML表格之一.
这是我选择的所有内容的查询:
$qry_questions = mysql_query("SELECT * FROM mbr_qa_questions ORDER BY q_votes DESC);
while($row = mysql_fetch_array($qry_questions){
//Grab all information
}
现在,我需要制作三个类似上面的查询,但是我需要它做这样的事情:
pull everything from every third row in a table starting at row #1
pull everything from every third row in a table starting at row #2
pull everything from every third row in a table starting at row #3
然后我将每个查询放入3列中的一列.
我不能通过唯一ID来做到这一点.是的,它是一个自动递增的ID,但很可能我必须将整行移动到另一个表中.
编辑:我已经添加了我计算每一行的尝试并将查询结果放入正确的“bin”
//GIVE EACH ENTRY A COLUMN NUMBER
$count++;
if($count >= 4){
$count = 1;
}?>
while($count == 1){
include("pieces/answers/newAnswerLayout.php");
}
?>
while($count == 2){
include("pieces/answers/newAnswerLayout.php");
}
?>
while($count == 3){
include("pieces/answers/newAnswerLayout.php");
}
?>