system text retrieve tags for tag

This commit is contained in:
Ulf Gebhardt 2016-02-12 04:54:12 +01:00
parent f812dc3762
commit e93c2b1514
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,13 @@
<?php
namespace SYSTEM\SQL;
class SYS_TEXT_GET_TAGS extends \SYSTEM\DB\QP {
public static function get_class(){return \get_class();}
public static function pgsql(){return
'SELECT * FROM system.text_tag'.
' WHERE id = $1 LIMIT $2;';
}
public static function mysql(){return
'SELECT * FROM system_text_tag'.
' WHERE id = ? LIMIT ?;';
}
}

View File

@ -78,6 +78,9 @@ class text {
return self::get_adv($id, \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG));}
return $res;
}
public static function get_tags($id,$limit){
return \SYSTEM\SQL\SYS_TEXT_GET_TAGS::QA(array($id,$limit));}
public static function get_latest($tag, $limit){
return \SYSTEM\SQL\SYS_TEXT_GET_LATEST::QA(array($tag, $limit));
}