Hide OAuth secret token.
Hide OAuth secret token.

File last commit:

d3dc8cc67273
e8e6e71c5975
Show More
type.php
29 lines | 683 B | text/x-php | PhpLexer
<?php
/* Types */
function get_typeByID( $id ) {
global $dbConnection;
$id = (int)$id;
$stmt = $dbConnection->executeQuery('SELECT id, name, description FROM strip_t WHERE id = ?', array($id));
$r = $stmt->fetch();
$r->meta = $dbConnection->fetchAll('SELECT meta AS id FROM meta WHERE type = ?', array($id));
return $r;
}
function get_allTypes() {
global $dbConnection;
$stmt = $dbConnection->executeQuery('SELECT id, name, description, meta FROM strip_t');
return $stmt->fetch();
}
function get_allMetaTypes() {
global $dbConnection;
return $dbConnection->fetchAll('SELECT id, name FROM meta_t');
}
function _getMetaNameFromObject($obj) {
return $obj->name;
}
?>