Search Postgresql Archives

Re: Postgres Pg_connect PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Forgot about COPY command in my previous reply:

  $conn = pg_pconnect("dbname=foo");
  $fd = fopen('file.dat', 'r');
 
pg_query($conn, "copy bar from stdin");
  while (!feof($fd)) {
        
pg_put_line($conn, fgets($fd));
  }

  fclose($fd);
  pg_put_line($conn, "\\.\n");
  pg_end_copy($conn);

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux