src/snac/server/database/DatabaseConnector.php
/**
     * Prepare A Statement
     *
     * Calls php postgres pg_prepare method.  The statement should be named, and the query given.
     *
     * @param string $statementName Name for the statement (allows multiple prepares)
     * @param string $query Query to prepare (with $1, $2, .. placeholders)
     */
Prepare A Statement
Calls php postgres pg_prepare method.  The statement should be named, and the query given.

@param string $statementName Name for the statement (allows multiple prepares)
@param string $query Query to prepare (with $1, $2, .. placeholders)
Prepare A Statement Calls php postgres pg_prepare method . The statement should be named and the query given . @param string $statementName Name for the statement ( allows multiple prepares ) @param string $query Query to prepare ( with $1 $2 .. placeholders )
public function prepare($statementName, $query) {
        try {
            $result = \pg_prepare($this->dbHandle, $statementName, $query);
            if ($result === false) {
                $errorMessage = \pg_last_error($this->dbHandle);
                throw new \Exception("Database Prepare Error: " . $errorMessage);
            }
        } catch (\Exception $e) {
            throw new \snac\exceptions\SNACDatabaseException($e->getMessage());
        }
    }
public function prepare ( $ statementName , $ query ) { try { $ result = \ pg_prepare ( $ this -> dbHandle , $ statementName , $ query ) ; if ( $ result === false ) { $ errorMessage = \ pg_last_error ( $ this -> dbHandle ) ; throw new \ Exception ( " Database Prepare Error:  " . $ errorMessage ) ; } } catch ( \ Exception $ e ) { throw new \ snac \ exceptions \ SNACDatabaseException ( $ e -> getMessage ( ) ) ; } }
Prepare A Statement
 Calls php postgres pg_prepare method.
Prepare A Statement Calls php postgres pg_prepare method .
// Check for error // Replace any exceptions with the SNAC Database Exception and re-throw back out