Re: pg_put_line() Frustration

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: pg_put_line() Frustration
Дата
Msg-id 20050620140531.GA26064@winnie.fuhr.org
обсуждение исходный текст
Ответ на pg_put_line() Frustration  ("Simon Hewitt" <sejh79@hotmail.com>)
Список pgsql-php
On Mon, Jun 20, 2005 at 01:29:47PM +0000, Simon Hewitt wrote:
>
> I am currently working on an application that will input multple lines into
> a Postgre database. I am using the following code

It's PostgreSQL or Postgres, not Postgre.

>  $sql = "COPY table_2 FROM STDIN DELIMITER AS '\t'";
>  pg_query($dbc, $sql);
>  $sql = $data1."\t".$data2."\t".implode("\t",
> $data)."\ttrue\t05-05-2005\n";
>  pg_put_line($this->dbc, $sql);
>  if(!pg_put_line($dbc, "\\N"))

The last line above attempts to add a row with a single NULL value,
so you get an error about missing data for the other columns.  What's
the purpose of that line?  Why do you sometimes use $dbc and sometimes
$this->dbc?  Do they refer to the same connection or to different
connections?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

В списке pgsql-php по дате отправления:

Предыдущее
От: "Simon Hewitt"
Дата:
Сообщение: pg_put_line() Frustration
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: pg_put_line() Frustration