src/Service/genIdService.php
private function _getIdWithSql($conn, $sql)
    {
        try
        {
            $rs = $conn->query($sql);
            Openbizx::$app->getLog()->log(LOG_DEBUG, "DATAOBJ", "Get New Id: $sql");
        }
        catch (Exception $e)
        {
            $this->errorMessage = "Error in query: " . $sql . ". " . $e->getMessage();
            return false;
        }

        if (($row = $rs->fetch()) != null)
        {
            //print_r($row);
            return $row[0];
        }
        return false;
    }
private function _getIdWithSql($conn, $sql)
    {
        try
        {
            $rs = $conn->query($sql);
            Openbizx::$app->getLog()->log(LOG_DEBUG, "DATAOBJ", "Get New Id: $sql");
        }
        catch (Exception $e)
        {
            $this->errorMessage = "Error in query: " . $sql . ". " . $e->getMessage();
            return false;
        }

        if (($row = $rs->fetch()) != null)
        {
            //print_r($row);
            return $row[0];
        }
        return false;
    }
Get ID with SQL

@param \Zend_Db_Adapter_Abstract $conn
@param string $sql
@return mixed