所有的SQL语句都要ADD到memcache中吗?
一般PHP程序中在哪会用到memcache呢, 
PHP程序中用到memcache的。如果服务器上没有memcache 岂不是程序就会出错了?

解决方案 »

  1.   

    ....
    SQL语句ADD到memcache去做啥呢 ?
      

  2.   

    $sql = 'select * from news where newsid>300000 and newsid<300020';
    $result = mysql_query($sql, $conn);while($row = mysql_fetch_row($result)){
    $str_ary[] = $row; }$sqlkey = md5($sql);
    $mem = new memcache; 
    $mem->connect($host, '11211');
    $mem->set($sqlkey, $str_ary, 0, 120);这种不是把键盘放到memcache中吗?