public
function
getPostData
(
$iPostId
)
{
$sqlQuery
=
$this
->
db
->
query
(
"SELECT * FROM posts WHERE id = "
.
$iPostId
.
";"
)
;
$aResult
=
$sqlQuery
->
result_array
(
)
;
if
(
empty
(
$aResult
)
)
{
show_404
(
)
;
}
else
{
return
$aResult
[
0
]
;
}
}