pg_copy_from

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • alain dhaene

    pg_copy_from

    Hi,

    Follow problem.

    I have a array.
    I want to copy the values in a database.
    I can do this with the insert statement but instead I would try it with the
    function pg_copy_from()

    As first parameter I have a resource to a database. I get the resource with
    the function getResource. This function is implemented in connectie.php (see
    below)
    Second parameter is the name of the table
    Third parameter is the array.

    When I call the function save_db() //see below I get the follow error:
    Fatal error: Call to undefined function: pg_copy_from() in C:\Program
    Files\Apache Group\Apache2\h tdocs\Enquete\c lEnquete.php on line 59




    Function save_db()

    {

    openDB();


    pg_copy_from(ge tResource(), "tbl_answer_cur sist", $this->antw_single) ;
    (line 59)

    }

    //connectie.php

    $link;

    Function openDB()

    {

    global $link;

    $link = mysql_pconnect( "localhost","", "")

    or die("geen connectie mogelijk : " . mysql_error());

    mysql_select_db ("Enquete") or die("geen database gevonden");

    function getResource()

    {

    global $link;

    return $link;

    }

    }



    What's the problem here?



    Alain


Working...