[英]SQL query empty result from php
i have this code, that search in my database, but with the php i get empty result, but when i try with phpmyadmin to run the query, it give me results... 我有这个代码,在我的数据库中进行搜索,但是用php却得到空结果,但是当我尝试用phpmyadmin运行查询时,它给了我结果...
// create query
$query = "SELECT * FROM Moduli WHERE annate LIKE '%$anno%' or annate = 'all'";
// execute query
$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());
while ($rows = mysql_fetch_array($result))
{
$lista = $lista."<a class='a' href='iscrivi.php?mode=singup&id=".$idfiglio."&mid=".$row[0]."'><div class='green'>".$row[1]."</div></a>";
}
why by php doesn't print anything? 为什么用PHP不打印任何内容?
不好,在循环中我写了变量“ row [0]”,但他的名字叫rowS [0]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.