getRemoteId(); if($remoteid>1){ foreach(DB::fetch_all("select * from %t where dateline<%d and remote<2 and filesize>0 ORDER BY dateline DESC limit $limit",array('attachment',$delay,$limit)) as $value){ io_remote::Migrate($value,$remoteid); } }