src/snac/server/database/SQL.php
/**
     * Select Resource By Data
     *
     * Checks to see if a resource already exists in database
     *
     * @param string $title optional The title of the resource to find
     * @param string $href optional The link of the resource to find
     * @param int $type optional The type of the resource to find
     * @return string[] Returns associative array of resource data if found
     */
Select Resource By Data
Checks to see if a resource already exists in database

@param string $title optional The title of the resource to find
@param string $href optional The link of the resource to find
@param int $type optional The type of the resource to find
@return string[] Returns associative array of resource data if found
Select Resource By Data Checks to see if a resource already exists in database @param string $title optional The title of the resource to find @param string $href optional The link of the resource to find @param int $type optional The type of the resource to find @return string [] Returns associative array of resource data if found
public function selectResourceByData($title = null, $href = null, $type = null) {
        $result = $this->sdb->query('select id, version from resource_cache
                                     where href = $1 and title = $2
                                     and type = $3 and not is_deleted
                                     and md5(title)::uuid = md5($2)::uuid', array($href,
                                                                                  $title,
                                                                                  $type));
        return $this->sdb->fetchAll($result);
    }
public function selectResourceByData ( $ title = null , $ href = null , $ type = null ) { $ result = $ this -> sdb -> query ( 'select id, version from resource_cache
                                     where href = $1 and title = $2
                                     and type = $3 and not is_deleted
                                     and md5(title)::uuid = md5($2)::uuid' , array ( $ href , $ title , $ type ) ) ; return $ this -> sdb -> fetchAll ( $ result ) ; }
Select Resource By Data
 Checks to see if a resource already exists in database
Select Resource By Data Checks to see if a resource already exists in database