PEAR Manual
Prev |  | Next

# DB_common::dropSequence()

DB_common::dropSequence() -- Deletes a sequence

## Synopsis

``integer dropSequence` (string $seqName)`

## Description

See "Intro - Sequences"

## Parameter

string `$seqName`

  name of the sequence to delete

## Return value

integer - `DB_OK` or a DB_Error object on failure

## Throws

Table 33-1. Possible PEAR_Error values

Error code | Error message | Reason | Solution
--- | --- | --- | ---
every error code |  | Database specific error | Check the name of the sequence. If correct, probably a bug in the sequence implementation.

## Note

This function can not be called statically.

Warning
When using PEAR DB's sequence methods, we strongly advise using these methods for all procedures, including the creation of the sequences. Do not use PEAR DB's methods to access sequences that were created directly in the DBMS. See the warning on the "Intro - Sequences" page complete information.

## Example

Example 33-1. Using dropSequence()
    <?php
    // Once you have a valid DB object named $db...
    $tmp = $db->dropSequence('mySequence');

    if (PEAR::isError($tmp)) {
        die($tmp->getMessage());
    }
    ?>

## See

"Intro - Sequences", createSequence(), nextId()

Prev | Home | Next
DB_common::disconnect() | Up | DB_common::escapeSimple()