Resistance, as a few people have pointed out, it is impossible to learn how to construct a dynamic database backed website on a single thread. It will take you weeks of study to get up to speed - and even then only if you have an aptitude for it.ResistanceMP3 said:right just downloaded Mysql five.I have installed the program, think I chose the right options, try to start the program up and got a DOS prompt. So where can I go from here to learn in two weeks how to produce a database for my website?
ResistanceMP3.
Enter password: *******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.0.15-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
) solution that you write will be infinitely worse than something that you can download for free from sourceforge.
<%
requestedCategory = request.form("selectCategory") & ""
databaseFileName = "resistance.mdb"
databaseDetails = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE="& Server.MapPath(databaseFileName)
if requestedCategory = "" then
queryText = "SELECT id, category_name FROM tblCategories "
set databaseConnection = Server.CreateObject("ADODB.Connection")
databaseConnection.open databaseDetails
set databaseQuery=Server.CreateObject("ADODB.RecordSet")
databaseQuery.Open queryText, databaseConnection, 1
if not databaseQuery.EOF then
categoriesList=databaseQuery.getRows()
end if
databaseQuery.close
set databaseQuery=nothing
databaseConnection.close
set databaseConnection = nothing
else
queryText = "SELECT " & _
"tblFiles.id, " & _
"tblFiles.file_URL, " & _
"tblFiles.file_title, " & _
"tblFiles.file_year, " & _
"tblFiles.file_author, " & _
"tblCategories.category_name " & _
"FROM tblCategories INNER JOIN (tblFiles INNER JOIN [tblFiles-Categories] ON tblFiles.id=[tblFiles-Categories].file_id) ON tblCategories.id=[tblFiles-Categories].category_id " & _
"WHERE tblCategories.id=" & requestedCategory & ";"
set databaseConnection = Server.CreateObject("ADODB.Connection")
databaseConnection.open databaseDetails
set databaseQuery=Server.CreateObject("ADODB.RecordSet")
databaseQuery.Open queryText, databaseConnection, 1
if not databaseQuery.EOF then
filesList=databaseQuery.getRows()
end if
databaseQuery.close
set databaseQuery=nothing
databaseConnection.close
set databaseConnection = nothing
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Files</title>
</head>
<body>
<%
if requestedCategory = "" then
%>
<form name="f1" id="f1" action="index.asp" method="post">
<select name="selectCategory" id="selectCategory">
<%
for i=lBound(categoriesList,2) to uBound(categoriesList,2)
categoryID = categoriesList(0,i)
categoryName = categoriesList(1,i)
%>
<option value="<%=categoryID%>"><%=categoryName%></option>
<%
next
%>
</select>
<input type="submit" value="Get stuff" />
</form>
<%
else
categoryName = filesList(5,0)
%>
<h2><%=categoryName%></h2>
<a href="javascript:history.go(-1)">back</a>
<table cellpadding="3" cellspacing="0" border="0">
<tr>
<th>Author</th>
<th>Title</th>
<th>Year</th>
</tr>
<%
for i=lBound(filesList,2) to uBound(filesList,2)
fileID = filesList(0,i)
fileURL = filesList(1,i)
fileTitle = filesList(2,i)
fileYear = filesList(3,i)
fileAuthor = filesList(4,i)
%>
<tr>
<td><%=fileAuthor%></td>
<td><a href="http://<%=fileURL%>"><%=fileTitle%></a></td>
<td><%=fileYear%></td>
</tr>
<%
next
%>
</table>
<%
end if
%>
</body>
</html>


Anyone who makes web applications in delphi is asking for trouble. Anyone who assumes a non-programmer can understand any of that ghastly VBScript *spits* is asking for trouble.Wintermute said:Well, tell me then. I'm genuinely confused here. What is it exactly that's so hard about this simple task that it's got you lot all running for your portal frameworks and CM systems? In the time that you've spent typing reasons not to try doing it, you could have built it, implemented it, debugged it and rewritten it in Delphi.![]()

Wintermute said:Well, tell me then. I'm genuinely confused here. What is it exactly that's so hard about this simple task that it's got you lot all running for your portal frameworks and CM systems? In the time that you've spent typing reasons not to try doing it, you could have built it, implemented it, debugged it and rewritten it in Delphi.![]()
Whats a mdb file when its at home...? 
Something to do with the opposite of security and efficiency, I think.jæd said:anyway... Do you worst...?Whats a mdb file when its at home...?
![]()


Wintermute said:I mean, come on. Read the code. It might not be pretty, but it makes sense. And that's not because it's in VBScript, or (God help us) because I wrote it. It's because it's fundamentally simple. Connect to a database, get some data, loop through it. It's the data structure that's important. Get that right and the code writes itself.
Wintermute said:I'm not a high and mighty programmer. I'm a professional, yes, but I haven't done anything in the code above that would require professional experience. It's basic scripting, tutorial level. I mean, who actually DOES the "hello world" tutorial? Nobody. You jump straight into the "how do I connect to a database" and "how do I get data from forms" ones. And that's all that this does.
fractionMan said:How can a table not have a primary key (even if it's multiple fields)? Bloody access.