src/snac/server/database/SQL.php
/**
     * Select Resource
     *
     * Gets the resource data out of the database for the given id and version.
     *
     * @param int $id Resource ID
     * @param int $version Resource version
     * @return string[] Associative array of resource data
     */
Select Resource
Gets the resource data out of the database for the given id and version.

@param int $id Resource ID
@param int $version Resource version
@return string[] Associative array of resource data
Select Resource Gets the resource data out of the database for the given id and version . @param int $id Resource ID @param int $version Resource version @return string [] Associative array of resource data
public function selectResource($id, $version)
    {
       $qq = 'select_resource';
       $this->sdb->prepare($qq,
                           'select
                           aa.id, aa.version, aa.title, aa.href, aa.abstract, aa.extent, aa.repo_ic_id,
                           aa.object_xml_wrap, aa.type, aa.date, aa.display_entry
                           from resource_cache as aa,
                           (select max(version) as version from resource_cache where version<=$1 and id=$2) as bb
                           where not aa.is_deleted and
                           aa.id=$2
                           and aa.version=bb.version');
       $result = $this->sdb->execute($qq,
                                     array($version,
                                           $id));
       $all = array();
       while ($row = $this->sdb->fetchrow($result))
       {
           array_push($all, $row);
       }
       $this->sdb->deallocate($qq);
       return $all;
   }
public function selectResource ( $ id , $ version ) { $ qq = 'select_resource' ; $ this -> sdb -> prepare ( $ qq , 'select
                           aa.id, aa.version, aa.title, aa.href, aa.abstract, aa.extent, aa.repo_ic_id,
                           aa.object_xml_wrap, aa.type, aa.date, aa.display_entry
                           from resource_cache as aa,
                           (select max(version) as version from resource_cache where version<=$1 and id=$2) as bb
                           where not aa.is_deleted and
                           aa.id=$2
                           and aa.version=bb.version' ) ; $ result = $ this -> sdb -> execute ( $ qq , array ( $ version , $ id ) ) ; $ all = array ( ) ; while ( $ row = $ this -> sdb -> fetchrow ( $ result ) ) { array_push ( $ all , $ row ) ; } $ this -> sdb -> deallocate ( $ qq ) ; return $ all ; }
Select Resource
 Gets the resource data out of the database for the given id and version.
Select Resource Gets the resource data out of the database for the given id and version .