Advertisement
Guest User

Untitled

a guest
Mar 30th, 2013
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1.     public function getPostData($iPostId) {
  2.         $sqlQuery = $this->db->query("SELECT * FROM posts WHERE id = " . $iPostId . ";");
  3.         $aResult = $sqlQuery->result_array();
  4.         if (empty($aResult)) {
  5.             show_404();
  6.         }
  7.         else {
  8.             return $aResult[0];
  9.         }
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement