Mercurial > hg > extraction-interface
diff develop/classes/basemodel.php @ 10:54a235d43694
add topic choosing in the TaggingText page
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 10 Feb 2015 16:20:29 +0100 |
parents | 63e08b98032f |
children | 3d6fba07bfbd |
line wrap: on
line diff
--- a/develop/classes/basemodel.php Mon Feb 09 18:59:24 2015 +0100 +++ b/develop/classes/basemodel.php Tue Feb 10 16:20:29 2015 +0100 @@ -2,7 +2,7 @@ abstract class BaseModel { // protected $database; - protected $systemNAME; + protected $systemNAME, $topic; public function __construct() { global $mysql_database, $mysql_server, $mysql_user, $mysql_password, $systemNAME; @@ -23,6 +23,7 @@ die ('Can\'t use foo : ' . mysql_error()); } + $this->topic = 1; // set the default topic to person (人物) } protected function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { @@ -88,6 +89,15 @@ return $result; } + protected function GetTopiclist() { + $query = sprintf("SELECT * FROM `topics`"); + $result = mysql_query($query); + if (!$result) { + return json_encode("Failed during selecting topics table."); + } + return $result; + } + }