Created
January 8, 2012 03:17
-
-
Save anonymous/1577026 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ws { | |
var $url = 'http://'.$_SERVER['HTTP_HOST']; | |
function __construct($db) {} | |
public function getSettings($token) { | |
global $db; | |
$stmt = $db->prepare("SELECT data FROM settings WHERE token=?"); | |
/* bind parameters for markers */ | |
$stmt->bind_param("s", $token); | |
/* execute query */ | |
$stmt->execute(); | |
/* bind result variables */ | |
$stmt->bind_result($data); | |
/* fetch value */ | |
$stmt->fetch(); | |
return $data; | |
/* close statement */ | |
$stmt->close(); | |
} | |
} | |
class blocks extends ws { | |
private $name; | |
function __construct($name) { | |
$this->name = $name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment