src/snac/server/database/SQL.php
/**
     * Get languages for list of resources
     *
     * Returns the list of all languages for a given array of resource ids.
     *
     * @param int[] $resourceIDs The resource IDs to grab
     * @return string[] An array of arrays of language data from the database
     */
Get languages for list of resources
Returns the list of all languages for a given array of resource ids.

@param int[] $resourceIDs The resource IDs to grab
@return string[] An array of arrays of language data from the database
Get languages for list of resources Returns the list of all languages for a given array of resource ids . @param int [] $resourceIDs The resource IDs to grab @return string [] An array of arrays of language data from the database
public function selectResourceLanguagesByList($resourceIDs)
    {
        if (count($resourceIDs) === 0)
            return array();
        $countList = array();
        for ($i = 1; $i <= count($resourceIDs); $i++) {
            $countList[$i] = '$'.$i;
        }
        $resourceIDList = implode(",", $countList);
        $qq = 'select_resource_language';
        $query = 'select aa.version, aa.resource_id, aa.id, aa.language_id, aa.script_id, aa.vocabulary_source, aa.note
        from resource_language as aa
        where aa.resource_id in ('.$resourceIDList.') and  not aa.is_deleted ';
        $this->sdb->prepare($qq, $query);
        $result = $this->sdb->execute($qq, $resourceIDs);
        $all = array();
        while($row = $this->sdb->fetchrow($result))
        {
            array_push($all, $row);
        }
        $this->sdb->deallocate($qq);
        return $all;
    }
public function selectResourceLanguagesByList ( $ resourceIDs ) { if ( count ( $ resourceIDs ) === 0 ) return array ( ) ; $ countList = array ( ) ; for ( $ i = 1 ; $ i <= count ( $ resourceIDs ) ; $ i ++ ) { $ countList [ $ i ] = '$' . $ i ; } $ resourceIDList = implode ( " , " , $ countList ) ; $ qq = 'select_resource_language' ; $ query = 'select aa.version, aa.resource_id, aa.id, aa.language_id, aa.script_id, aa.vocabulary_source, aa.note
        from resource_language as aa
        where aa.resource_id in (' . $ resourceIDList . ') and  not aa.is_deleted ' ; $ this -> sdb -> prepare ( $ qq , $ query ) ; $ result = $ this -> sdb -> execute ( $ qq , $ resourceIDs ) ; $ all = array ( ) ; while ( $ row = $ this -> sdb -> fetchrow ( $ result ) ) { array_push ( $ all , $ row ) ; } $ this -> sdb -> deallocate ( $ qq ) ; return $ all ; }
Get languages for list of resources
 Returns the list of all languages for a given array of resource ids.
Get languages for list of resources Returns the list of all languages for a given array of resource ids .