473,387 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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\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
Jul 17 '05 #1
0 1307

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: ghe | last post by:
Good day to all, I just wanted to ask if there is an equivalent of Oracle's Cursor in PHP? Does anyone here know how to create a cursor in PHP? Thank you in Advance.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.