一聚教程网:一个值得你收藏的教程网站

热门教程

php An error occured

时间:2022-07-02 10:38:14 编辑:袖梨 来源:一聚教程网

function install_postgresql($name, $mail, $title, $content){

$pgsql_conn = pg_connect("host=localhost port=5432 dbname=book user=vi");
if (!$pgsql_conn) {
   echo "connect database error.n";
   exit;
}

$result = pg_query($pgsql_conn, "INSTER INTO topic (man, mail, title, content) VALUES ('$name', '$mail', '$title', '$content');");
if(!$result){
        echo "An error occured.n";
        exit;
}

pg_close($pgsql_conn);
}
?>

注要是你在sql后面加了;号,去了就行了,

热门栏目