我试图从同一个查询 ( ) 中填充这两个数组 ( 和 ) ,time2
但是只填充了第一个数组,
我不明白为什么......实现了,当我需要获取一些数组位置的值时,应该会出现正确的值。这就是为什么我不能创建另一个相同的查询。
这可能吗?text
$result
ORDER BY RAND ()
//Array Time
var time2 = [<?php $title=$_GET["title"];
$result = mysql_query("SELECT tag, round(avg(timecode)) as timecode, group_id
FROM tags
WHERE tags.filename = '".$title."'
GROUP BY group_id, tag
ORDER BY RAND()");
while($row = mysql_fetch_array($result))
{
$timecode = $row['timecode'];
print $timecode;
print ",";
}?>]
//Array Text
var text = [<?php
while($row = mysql_fetch_array($result))
{
$tag = $row['tag'];
print "'";
print $tag;
print "'";
print ",";
}?>]