comproj.html
dbconnect();
/*
Below we create a cursor named companyproj that selects all of the projects belonging to a
company that is generated from viewcomp.html. In the loop down below we output the results
in an unordered list format. The user can then click on the project name to view it.
*/
companyproj = database.cursor("SELECT * FROM project WHERE companyname = '" + request.companyname + "'")
i = false
while(companyproj.next()) {
if(i == false) {
write("" + request.companyname + "之專案資料
.");
i = true
}
write("- " + companyproj.projectname + "");
}
if(i == false) {
write("" + request.companyname + "沒有專案資料.");
}