$query="insert into Template(id,body) values ('$projectdir-$shortfilename',".$conn->quote((file_get_contents("$projectPath/$projectdir/$filename"))).")";
$conn->query($query);
}
}
}
}
// update all artifacts in the startme table
$query="select ID from Artifact";
$table=$conn->query($query);
foreach($tableas$artifactid){
debug("launching artifact ".$artifactid['ID']);
update($conn,$artifactid['ID']);
}
}
/**
* restart
*
* Initialize the db
*
* @param $conn : A valid database PDO connection
*/
functionrestart($conn)
{
executeSqlFile('init-db-schema.sql',$conn);
}
/**
* execute the content of an SQL file
*
* @param $file_name : the name of a file containing SQL queries