public static function aGetAdIDsByUrl($sUrl) { $aWhere = array('url_hash' => Utilitu::sConditionalHash($sUrl)); $aHtmls = DirectDB::aSelect('ads_htmls', $aWhere, 'id'); $aHtmlIDs = Utilitu::aExtractFieldFromArray($aHtmls, 'id', 'intval'); $aAdRows = DirectDB::aSelect('ads', array('html_id' => $aHtmlIDs)); $aAdIDs = Utilitu::aExtractFieldFromArray($aAdRows, 'id', 'intval'); return $aAdIDs; }