PHP и Postgres: ловить ошибки?
Как подготовить код, если что-то не получается? С оператором try-catch или?
function delete_question ( $question_id ) {
$dbconn = pg_connect("host=localhost port=5432 dbname=heoa user=heoa password=123");
// removes questions and its dependencies: answers and tags
$result = pg_query_params ( $dbconn,
'DELETE FROM questions
WHERE question_id = $1',
array ( $question_id )
);