I'm havin trouble storing an array of data. Below is the code use in the web application to check to see if the data is there, and if it's there serve it, else, cache it then serve it. I am using MySQLi
$id = $db->real_escape_string($_GET['id']);
$key = 'content_' . $app; 
$data = apc_fetch($key);
if (!is_array($data)) {  
    $result = $db->query("SELECT * FROM pages_content WHERE id = $id");
    $rawdata = $result->fetch_assoc();
    $data = $result->fetch_array(MYSQLI_ASSOC);  
    apc_store($key, $data);
    echo "<!-- DATA_NOT_FOUND_AND_STORED-- >";
}
开发者_如何学GoCan you see what I'm doing wrong?
Thanks
I've solved it.
$key was not set correctly.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论