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

pg query function syntax tag tutorial 2013





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

Php pg query () function

Write your php code

 
<?php ?>

Php Result


Your code below



(PHP 4 >= 4.2.0, PHP 5)

pg_query -- Execute a query

Syntax

resource pg_query ( string query )

resource pg_query ( resource connection, string query )

pg_query() returns a query result resource if query could be executed. It returns FALSE on failure or if connection is not a valid connection. Details about the error can be retrieved using the pg_last_error() function if connection is valid. pg_query() sends an SQL statement to the PostgreSQL database specified by the connection resource. The connection must be a valid connection that was returned by pg_connect() or pg_pconnect(). The return value of this function is an query result resource to be used to access the results from other PostgreSQL functions such as pg_fetch_array().

Note: connection is an optional parameter for pg_query(). If connection is not set, default connection is used. Default connection is the last connection made by pg_connect() or pg_pconnect().

Although connection can be omitted, it is not recommended, since it could be a cause of hard to find bug in script.

Note: This function used to be called pg_exec(). pg_exec() is still available for compatibility reasons but users are encouraged to use the newer name.

Php pg query Function syntax tag

pg query 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 query 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