name|fileid|refferer|clicks|
good|same |asda.com|20 |
good|same |bsad.com|500 |
good|diffnt|csad.com|600 |
dddd|dasdds|asad.com|200 |
输出:
[asda.com,20],[bsda.com,500]
我尝试了什么:
$result = mysql_query("SELECT * FROM `ios7_refclean`.`graph_refferer_table` WHERE Name = 'good'");
$rowz = mysql_fetch_assoc($result);
foreach ($rowz as $col => $value) {
if (($col !== "fileid") && ($col !== "name")) {
echo ",['" . $col . "'," . $value . "]";
}
然而,只有一排好货来了,其他排都没有。此外,我无法将引用者的链接$col
与$value
方括号的点击链接。