You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check for quadrats not matching another file, i.e. tempNewPlants. Is there an easier way??? Remember that there may be more than one record with the same tag in tempNewPlants "SELECT DISTINCT Tag, QuadratName FROM ".$fileout." WHERE PlotID=".$plotID
Cloud
Looks for quadrats that don’t match those available at a given site
$filein $tempTableName = 'TempLocations';
$fileout $tempNewTable = 'TempNewPlants';
publicfunctioncheckQuadrat ($filein, $fileout, $plotID)
{
//Check for quadrats not matching another file, i.e. tempNewPlants//Is there an easier way??? Remember that there may be more than one record with the same Tag in tempNewPlants$q1 = "SELECT Tag, QuadratName FROM ".$fileout." WHERE PlotID=".$plotID." GROUP BY Tag";
$runQ1 = $this->screeningdb->query($q1);
if ($runQ1->num_rows() > 0)
{
foreach($runQ1->result() as$row)
{
$q2 = 'UPDATE '.$filein.' SET Errors = CONCAT(TRIM(Errors),";Tree is in quadrat='.$row->QuadratName.' in '.$fileout.'") WHERE Tag = "'.$row->Tag.'" and QuadratName <> "'.$row->QuadratName.'" AND Errors <> "NONE" AND Errors <> "" AND Errors IS NOT NULL';
$q3 = 'UPDATE '.$filein.' SET Errors = "Tree is in quadrat='.$row->QuadratName.' in '.$fileout.'" WHERE Tag ="'.$row->Tag.'" AND QuadratName<>"'.$row->QuadratName.'" AND Errors <> "NONE" AND (Errors = "" OR ISNULL(Errors))';
$runQ2 = $this->screeningdb->query($q2);
$runQ3 = $this->screeningdb->query($q3);
}
}
}
See "instructions for writing a validation function". Below are notes from the spec, the original validation function (in the PHP language), and the SQL table structure.
The text was updated successfully, but these errors were encountered: