You are here

function DB_pgsql::createSequence in Flickr API 5

Creates a new sequence

DB_pgsql::nextID(), DB_pgsql::dropSequence()

Parameters

string $seq_name name of the new sequence:

Return value

int DB_OK on success. A DB_Error object on failure.

Overrides DB_common::createSequence

See also

DB_common::createSequence(), DB_common::getSequenceName(),

1 call to DB_pgsql::createSequence()
DB_pgsql::nextId in phpFlickr/PEAR/DB/pgsql.php
Returns the next free id in a sequence

File

phpFlickr/PEAR/DB/pgsql.php, line 713

Class

DB_pgsql
The methods PEAR DB uses to interact with PHP's pgsql extension for interacting with PostgreSQL databases

Code

function createSequence($seq_name) {
  $seqname = $this
    ->getSequenceName($seq_name);
  $result = $this
    ->query("CREATE SEQUENCE {$seqname}");
  return $result;
}