Mercurial > hg > extraction-interface
comparison classes/basemodel.php @ 78:960ba96efce1 extractapp
Update: click to popup remove-tag-window; select to popup tag-window
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 20 Apr 2015 15:44:54 +0200 |
parents | 97c1e5102a22 |
children | f1f849d31272 |
comparison
equal
deleted
inserted
replaced
77:97c1e5102a22 | 78:960ba96efce1 |
---|---|
68 return json_encode("Failed during selecting wordlist table.");; | 68 return json_encode("Failed during selecting wordlist table.");; |
69 } | 69 } |
70 return $result; | 70 return $result; |
71 } | 71 } |
72 | 72 |
73 protected function GetSectionsByID($section_id) { | 73 protected function GetSectionsById($section_id) { |
74 $query = sprintf("SELECT * FROM `sections_index` WHERE `id`=\"%s\"", $section_id); | 74 $query = sprintf("SELECT * FROM `sections_index` WHERE `id`=\"%s\"", $section_id); |
75 $result = mysql_query($query); | 75 $result = mysql_query($query); |
76 if (!$result){ | 76 if (!$result){ |
77 echo json_encode("Failed during selecting sections_index table"); | 77 echo json_encode("Failed during selecting sections_index table"); |
78 return; | 78 return; |
87 return json_encode("Failed during selecting taglist table."); | 87 return json_encode("Failed during selecting taglist table."); |
88 } | 88 } |
89 return $result; | 89 return $result; |
90 } | 90 } |
91 | 91 |
92 protected function GetBooksByID($bookId) { | 92 protected function GetBooksById($bookId) { |
93 $query = sprintf("SELECT * FROM `books` WHERE id=\"%s\"", $bookId); | 93 $query = sprintf("SELECT * FROM `books` WHERE id=\"%s\"", $bookId); |
94 $result = mysql_query($query); | 94 $result = mysql_query($query); |
95 if (!$result) { | 95 if (!$result) { |
96 return json_encode("Failed during selecting books table."); | 96 return json_encode("Failed during selecting books table."); |
97 } | 97 } |
98 return $result; | 98 return $result; |
99 } | 99 } |
100 | 100 |
101 protected function GetTopiclist() { | 101 protected function GetTopicList() { |
102 $query = sprintf("SELECT * FROM `topics`"); | 102 $query = sprintf("SELECT * FROM `topics`"); |
103 $result = mysql_query($query); | 103 $result = mysql_query($query); |
104 if (!$result) { | 104 if (!$result) { |
105 return json_encode("Failed during selecting topics table."); | 105 return json_encode("Failed during selecting topics table."); |
106 } | 106 } |
107 return $result; | 107 return $result; |
108 } | 108 } |
109 | 109 |
110 protected function GetTopicByID($topic_id) { | 110 protected function GetTopicById($topic_id) { |
111 $query = sprintf("SELECT * FROM `topics` WHERE id=\"%s\"", $topic_id); | 111 $query = sprintf("SELECT * FROM `topics` WHERE id=\"%s\"", $topic_id); |
112 $result = mysql_query($query); | 112 $result = mysql_query($query); |
113 if (!$result) { | 113 if (!$result) { |
114 return json_encode("Failed during selecting topics table."); | 114 return json_encode("Failed during selecting topics table."); |
115 } | 115 } |