gowans007
08-05-2004, 10:05 AM
Guys here's a bit of a tester!
For Me Anyway! (newbie to ASP have worked with PHP)
I have access to a SQL database but it only has 5 field
Name
TL
Clearway
Comments
Type
However I have 10 peices of information to store.
I have linked these by puting the info on different records and having name as primary key.
Name:Name
Clearway:tel
Comments:email
Type:1
Name:Name
TL:job
Clearway:age
Comments:description
Type:2
Name:Name
TL:location
Clearway:school
Comments:hobbie
Type:3
I have a page that savs this info fine but when it comes to displaying it, i can become jumbled with each record. How can I amend this so it displays the reocords of type 2 and 3 where its equal to name of displayed type 1.
PAGE Currently displays all results but not in any order and can show on one line a made up a part 1 part 2 part 3 of different Names.
************ CODE SECTION ***************
DBConnection.Open DSN
response.write ("<table border='0' width='100%'>")
SQL= "SELECT * FROM ProcessExpert WHERE Type = '1'"
Set RS = DBConnection.Execute(SQL)
do until rs.eof
response.write ("<tr class='bodytext'>")
response.write ("<td><div align='center'><strong>") & rs("Name")
response.write ("</strong></div></td>")
response.write ("<td><div align='center'>") & rs("TL")
response.write ("</div></td>")
response.write ("<td><div align='center'>") & rs("Clearway")
response.write ("</div></td>")
response.write ("<td><div align='center'>") & rs("Comments")
response.write ("</div></td>")
rs.movenext
loop
response.write ("</table></td><td width='41%' colspan='3'><table border='0' width='100%'>")
rs.close
SQL= "SELECT * FROM ProcessExpert WHERE Type = '2'"
Set RS = DBConnection.Execute(SQL)
do until rs.eof
response.write ("<tr class='bodytext'>")
response.write ("<td><div align='center'>") & rs("TL")
response.write ("</div></td>")
response.write ("<td><div align='center'>") & rs("Comments")
response.write ("</div></td>")
response.write ("<td><div align='center'>") & rs("Clearway")
response.write ("</div></td>")
rs.movenext
loop
response.write ("</table></td><td width='32%' colspan='4'><table border='0' width='100%'>")
rs.close
SQL= "SELECT * FROM ProcessExpert WHERE Type = '3'"
Set RS = DBConnection.Execute(SQL)
do until rs.eof
response.write ("<tr class='bodytext'>")
response.write ("<td><div align='center'><strong>") & rs("TL")
response.write ("</strong></div></td>")
response.write ("<td><div align='center'>") & rs("Clearway")
response.write ("</div></td>")
response.write ("<td><div align='center'>") & rs("Comments")
response.write ("</div></td>")
response.write ("<td><div align='right'><a href='bcin.asp?res=")
response.write rs("Name") & ("' class='LHNavLink'>DELETE</a></div></td></tr>")
rs.movenext
loop
response.write ("</table></td></tr>")
rs.close
For Me Anyway! (newbie to ASP have worked with PHP)
I have access to a SQL database but it only has 5 field
Name
TL
Clearway
Comments
Type
However I have 10 peices of information to store.
I have linked these by puting the info on different records and having name as primary key.
Name:Name
Clearway:tel
Comments:email
Type:1
Name:Name
TL:job
Clearway:age
Comments:description
Type:2
Name:Name
TL:location
Clearway:school
Comments:hobbie
Type:3
I have a page that savs this info fine but when it comes to displaying it, i can become jumbled with each record. How can I amend this so it displays the reocords of type 2 and 3 where its equal to name of displayed type 1.
PAGE Currently displays all results but not in any order and can show on one line a made up a part 1 part 2 part 3 of different Names.
************ CODE SECTION ***************
DBConnection.Open DSN
response.write ("<table border='0' width='100%'>")
SQL= "SELECT * FROM ProcessExpert WHERE Type = '1'"
Set RS = DBConnection.Execute(SQL)
do until rs.eof
response.write ("<tr class='bodytext'>")
response.write ("<td><div align='center'><strong>") & rs("Name")
response.write ("</strong></div></td>")
response.write ("<td><div align='center'>") & rs("TL")
response.write ("</div></td>")
response.write ("<td><div align='center'>") & rs("Clearway")
response.write ("</div></td>")
response.write ("<td><div align='center'>") & rs("Comments")
response.write ("</div></td>")
rs.movenext
loop
response.write ("</table></td><td width='41%' colspan='3'><table border='0' width='100%'>")
rs.close
SQL= "SELECT * FROM ProcessExpert WHERE Type = '2'"
Set RS = DBConnection.Execute(SQL)
do until rs.eof
response.write ("<tr class='bodytext'>")
response.write ("<td><div align='center'>") & rs("TL")
response.write ("</div></td>")
response.write ("<td><div align='center'>") & rs("Comments")
response.write ("</div></td>")
response.write ("<td><div align='center'>") & rs("Clearway")
response.write ("</div></td>")
rs.movenext
loop
response.write ("</table></td><td width='32%' colspan='4'><table border='0' width='100%'>")
rs.close
SQL= "SELECT * FROM ProcessExpert WHERE Type = '3'"
Set RS = DBConnection.Execute(SQL)
do until rs.eof
response.write ("<tr class='bodytext'>")
response.write ("<td><div align='center'><strong>") & rs("TL")
response.write ("</strong></div></td>")
response.write ("<td><div align='center'>") & rs("Clearway")
response.write ("</div></td>")
response.write ("<td><div align='center'>") & rs("Comments")
response.write ("</div></td>")
response.write ("<td><div align='right'><a href='bcin.asp?res=")
response.write rs("Name") & ("' class='LHNavLink'>DELETE</a></div></td></tr>")
rs.movenext
loop
response.write ("</table></td></tr>")
rs.close