продвигать индекс
$rows = MessageQuery::create();
$index = 0;
foreach($rows as $row){
if(index == 3){
$var = $row->findId();
}
index++;
}
Jesus
$rows = MessageQuery::create();
$index = 0;
foreach($rows as $row){
if(index == 3){
$var = $row->findId();
}
index++;
}