| @@ 2188-2199 (lines=12) @@ | ||
| 2185 | PMF_Db::getTablePrefix(), |
|
| 2186 | $id_question); |
|
| 2187 | ||
| 2188 | if ($result = $this->_config->getDb()->query($query)) { |
|
| 2189 | if ($row = $this->_config->getDb()->fetchObject($result)) { |
|
| 2190 | $question = array( |
|
| 2191 | 'id' => $row->id, |
|
| 2192 | 'username' => $row->username, |
|
| 2193 | 'email' => $row->email, |
|
| 2194 | 'category_id' => $row->category_id, |
|
| 2195 | 'question' => $row->question, |
|
| 2196 | 'created' => $row->created, |
|
| 2197 | 'is_visible' => $row->is_visible); |
|
| 2198 | } |
|
| 2199 | } |
|
| 2200 | ||
| 2201 | return $question; |
|
| 2202 | } |
|
| @@ 2225-2238 (lines=14) @@ | ||
| 2222 | PMF_Db::getTablePrefix(), |
|
| 2223 | ($all == false ? "WHERE is_visible = 'Y'" : '')); |
|
| 2224 | ||
| 2225 | if ($result = $this->_config->getDb()->query($query)) { |
|
| 2226 | while ($row = $this->_config->getDb()->fetchObject($result)) { |
|
| 2227 | $questions[] = array( |
|
| 2228 | 'id' => $row->id, |
|
| 2229 | 'username' => $row->username, |
|
| 2230 | 'email' => $row->email, |
|
| 2231 | 'category_id' => $row->category_id, |
|
| 2232 | 'question' => $row->question, |
|
| 2233 | 'created' => $row->created, |
|
| 2234 | 'answer_id' => $row->answer_id, |
|
| 2235 | 'is_visible' => $row->is_visible |
|
| 2236 | ); |
|
| 2237 | } |
|
| 2238 | } |
|
| 2239 | return $questions; |
|
| 2240 | } |
|
| 2241 | ||