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\htdocs\Enquete\clEnquete.php on line 59
Function save_db()
{
openDB();
pg_copy_from(getResource(), "tbl_answer_cursist", $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