Add Custom columns through config. Only tested in HTML catalog for now
re #32
This commit is contained in:
parent
a96888c76a
commit
f4675dec52
5 changed files with 71 additions and 6 deletions
|
@ -55,6 +55,15 @@ class CustomColumn extends Base {
|
|||
$post = $result->fetchObject ();
|
||||
return $post->name;
|
||||
}
|
||||
|
||||
public static function getCustomId ($lookup) {
|
||||
$result = parent::getDb ()->prepare('select id from custom_columns where label = ?');
|
||||
$result->execute (array ($lookup));
|
||||
if ($post = $result->fetchObject ()) {
|
||||
return $post->id;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
public static function getCount($customId) {
|
||||
$nCustoms = parent::getDb ()->query('select count(*) from ' . self::getTableName ($customId))->fetchColumn();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue