@@ 112-122 (lines=11) @@ | ||
109 | $stmt = mysql_query($query); |
|
110 | $returnResult = $this->_serializePosts($stmt); |
|
111 | break; |
|
112 | case 'Tags': |
|
113 | $query = "SELECT t.*, tt.description" |
|
114 | ." FROM `wp_terms` AS t INNER JOIN `wp_term_taxonomy` as tt" |
|
115 | ." ON tt.term_id = t.term_id" |
|
116 | ." WHERE tt.taxonomy = 'post_tag'"; |
|
117 | if ($filter !== null) { |
|
118 | $query .= " AND $filter"; |
|
119 | } |
|
120 | $stmt = mysql_query($query); |
|
121 | $returnResult = $this->_serializeTags($stmt); |
|
122 | break; |
|
123 | case 'Categories': |
|
124 | $query = "SELECT t.*, tt.description" |
|
125 | ." FROM `wp_terms` AS t INNER JOIN `wp_term_taxonomy` as tt" |
|
@@ 123-133 (lines=11) @@ | ||
120 | $stmt = mysql_query($query); |
|
121 | $returnResult = $this->_serializeTags($stmt); |
|
122 | break; |
|
123 | case 'Categories': |
|
124 | $query = "SELECT t.*, tt.description" |
|
125 | ." FROM `wp_terms` AS t INNER JOIN `wp_term_taxonomy` as tt" |
|
126 | ." ON tt.term_id = t.term_id" |
|
127 | ." WHERE tt.taxonomy = 'category'"; |
|
128 | if ($filter !== null) { |
|
129 | $query .= " AND $filter"; |
|
130 | } |
|
131 | $stmt = mysql_query($query); |
|
132 | $returnResult = $this->_serializeCategories($stmt); |
|
133 | break; |
|
134 | case 'Comments': |
|
135 | $query = "SELECT * FROM `wp_comments` WHERE" |
|
136 | ." wp_comments.comment_approved = 1"; |