Skip to content

Instantly share code, notes, and snippets.

Created January 8, 2012 03:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1577026 to your computer and use it in GitHub Desktop.
Save anonymous/1577026 to your computer and use it in GitHub Desktop.
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