【发布时间】:2010-11-25 09:49:56
【问题描述】:
如果出现故障,我应该如何准备代码?用 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 )
);
【问题讨论】:
标签: php postgresql error-handling