daily pastebin goal
14%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. function read( $id ) {
  3.     // Set empty result
  4.     $data = '';
  5.     // Fetch session data from the selected database
  6.     $time = time();
  7.     $newid = $this->mdb2->escape($id);
  8.     $sql = "SELECT data FROM cake_sessions WHERE id = '$newid' AND expires > $time";
  9.     $res =& $this->mdb2->query($sql);
  10.    
  11.     if (PEAR::isError($res)) {
  12.         die($this->mdb2->getMessage());
  13.         }
  14.    
  15.     if($res->numRows() > 0) {
  16.         $row = $res->fetchRow();
  17.         $data = $row['data'];
  18.     }
  19.     return $data;
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top