SwatDB/SwatDB.php
public static function executeStoredProcOne($db, $proc, $params)
    {
        if (!is_array($params)) {
            $params = array($params);
        }

        $rs = self::executeStoredProc($db, $proc, $params);
        $row = $rs->getFirst();
        return current($row);
    }
public static function executeStoredProcOne($db, $proc, $params)
    {
        if (!is_array($params)) {
            $params = array($params);
        }

        $rs = self::executeStoredProc($db, $proc, $params);
        $row = $rs->getFirst();
        return current($row);
    }
public static function executeStoredProcOne ( $ db , $ proc , $ params ) { if ( ! is_array ( $ params ) ) { $ params = array ( $ params ) ; } $ rs = self :: executeStoredProc ( $ db , $ proc , $ params ) ; $ row = $ rs -> getFirst ( ) ; return current ( $ row ) ; }
Execute a stored procedure that returns a single value

Convenience method to execute a stored procedure that returns a single
value.

@param MDB2_Driver_Common $db The database connection.

@param string $proc The name of the stored procedure to execute.

@param mixed $params The parameters to pass to the stored procedure.
Use an array for more than one parameter.

@return mixed The value returned by the stored procedure.

@throws SwatDBException
Execute a stored procedure that returns a single value