'; $abi=''; $paring = db_query("SELECT a.data, a.operation FROM {activity} a WHERE a.type='club' ORDER BY a.created DESC LIMIT 2"); while ($tulemus = db_fetch_object($paring)){ preg_match_all('|s:(.*):"node-id";s:(.*):"(.*)";|U', $tulemus->data, $liitumine); if($abi=='' or $abi!=$liitumine[3][0]){ $paringKlubi = db_query("SELECT n.title, oguid.created, oguid.nid, og.og_description, ctc.field_klubipilt_fid FROM {og_uid} oguid INNER JOIN {node} n ON oguid.nid=n.nid INNER JOIN {content_type_club} ctc ON ctc.nid=oguid.nid INNER JOIN {og} ON og.nid=oguid.nid WHERE oguid.nid=%d AND oguid.is_active=1 ORDER BY oguid.changed DESC LIMIT 1", $liitumine[3][0]); $klubi = db_fetch_object($paringKlubi); if($klubi->field_klubipilt_fid==''){ $aadress=''; } else { $paringPilt = db_query("SELECT f.filepath FROM {files} f WHERE f.fid=%d", $klubi->field_klubipilt_fid); $tulemus2 = db_fetch_object($paringPilt); $aadress=''; } $block_content .= '