0
我有这样的代码从我的源Memcached的结果= 0
if ($where != "")
$where = "WHERE $where";
$res = $mysqli->query("SELECT COUNT(id) FROM torrents $where LIMIT 1") or die(mysql_error());
$row = mysqli_fetch_array($res);
$count = $row[0];
我尝试这是该corect? :
if ($where != "")
$where = "WHERE $where";
$ress = $mysqli->query('SELECT COUNT(id) FROM torrents $where LIMIT 1';) or die(mysql_error());
$nombre ='details'.$ress;
$res = mysqli_query($ress);
$count = array();
while($count = mysqli_fetch_array($res)) $rows[] = $count;
$memcache->set($nombre, $count, 1);
结果 “对不起朋友找不到”
所以..还有就是在你的表中没有数据 – Ravi