首頁  >  文章  >  php教程  >  php An error occured

php An error occured

WBOY
WBOY原創
2016-05-25 16:53:301666瀏覽

<?php
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 (&#39;$name&#39;, &#39;$mail&#39;, &#39;$title&#39;, &#39;$content&#39;);");
    if (!$result) {
        echo "An error occured.\n";
        exit;
    }
    pg_close($pgsql_conn);
}


陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn