prepare("SELECT * FROM posts WHERE id = ?"); $s->bind_param("s", $id); $s->execute(); $d = $s->get_result()->fetch_assoc(); if (!(bool)$d) { return null; } if (ThisFileIsRequested(__FILE__)) { require_once("../_json.php"); $SectionID = null; if (isset($_REQUEST["id"])) { if (!ctype_digit($_REQUEST["id"])) ReturnJSONError($Err_RDP_InvalidID, "id must be numeric"); $SectionID = intval($_REQUEST["id"]); } else { ReturnJSONError($Err_RDP_InvalidID, "id must be specified"); } /* $ResponseData = ComSec_GetComms($SectionID); if ($ResponseData) ReturnJSONData($ResponseData); else ReturnJSONError($Err_DP_IDNotFound, "wrong id"); */ } ?>