SQLITE problem reusing $result after form submission

The following works well to the point of reusing $results. Never gets past second table store. Is it a form problem or a sqlite memory problem and is there any a way to get around it? Able to reuse $results regularly outside of this situation. Thanks

if(isset($POST['formsubmit']))
{ $zip = $_POST['zip'];
 $results = $ziplist->all();
 foreach($results as $user){
if($user->zipcode()==$zip{
 ...
}  GETS HERE
$results = $st_county->all();
{..
} }

Where does $st_county come from? And what exactly is the issue?

My database was corrupted. Thank you.