Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

pg put line function syntax tag tutorial 2013 Donate at flattr Flattr this





Alert! Connect with 10,000 Chating Online. Join Now

Php pg put line () function

Write your php code

 
<?php ?>

Php Result


Your code below



(PHP 4 >= 4.0.3, PHP 5)

pg_put_line -- Send a NULL-terminated string to PostgreSQL backend

Syntax

bool pg_put_line ( string data )

bool pg_put_line ( resource connection, string data )

pg_put_line() sends a NULL-terminated string to the PostgreSQL backend server. This is useful for example for very high-speed inserting of data into a table, initiated by starting a PostgreSQL copy-operation. That final NULL-character is added automatically. Returns TRUE on success or FALSE on failure.

Note: The application must explicitly send the two characters "\." on the last line to indicate to the backend that it has finished sending its data.

Warning

Use of the pg_put_line() causes most large object operations, including pg_lo_read() and pg_lo_tell(), to subsequently fail. You can use pg_copy_from() and pg_copy_to() instead.

Examples

Example 1. High-speed insertion of data into a table

<?php
  $conn
= pg_pconnect("dbname=foo");
  
pg_query($conn, "create table bar (a int4, b char(16), d float8)");
  
pg_query($conn, "copy bar from stdin");
  
pg_put_line($conn, "3\thello world\t4.5\n");
  
pg_put_line($conn, "4\tgoodbye world\t7.11\n");
  
pg_put_line($conn, "\\.\n");
  
pg_end_copy($conn);
?>

See Also

pg_end_copy()

Php pg put line Function syntax tag

pg put line php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online



Php pg put line syntax tutorial

php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.


Function index

Variables

Expressions

Operators

Control-Structures

Cookies

Array

Date & Time

Directory function

File

Image

Operators

Form data handling

Mathematics operators

Mail

Php Mysql

Network Functions

Strings

php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
 
 
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online