$err, 'ids' => array())); exit; } $db = getDB(); $qmarks = join(',', array_fill(0, count($ids), '?')); $stat = $db->query("delete from bedfile where bedfile_id in ($qmarks)", $ids); $stat = $db->query("delete from summarybed where bedfile_id in ($qmarks)", $ids); //if($filepath = $db->getOne("select filepath from rawbed where bedfile_id in ($qmarks)", $_GET['ids'])) { $filepaths = $db->getCol("select filepath from rawbed where bedfile_id in ($qmarks)", 0, $ids); foreach($filepaths as $f) { unlink($f); } $stat = $db->query("delete from rawbed where bedfile_id in ($qmarks)", $ids); if(PEAR::isError($stat)) { file_put_contents('/tmp/dasrdel.log', print_r($stat, true)); exit; } $count = $db->getOne("select count(*) from bedfile where experiment_id = ?", $_GET['experiment_id']); $db->query("update experiment set bedcount = ? where experiment_id = ?", array($count, $_GET['experiment_id'])); $db->commit(); print json_encode(array('err' => $err, "ids" => $ids)); ?>