Only display certain details from an access database display using ASP classic?

triggermorf

New member
I have written a booking system and when a shop employee logon they can view bookings they have. Although at the moment they can see all the bookings from the bookings table in the access database. I would like it so they could only see there own bookings and everyone elses as this has caused problems in the past. My code is below if anyone could help me I would appericate it a lot. I know it will be the SQL statement I just don't know how to change it.

<%@ Language=VBScript %>

<%
set conx=server.CreateObject("adodb.connection")

conx.Provider="Microsoft.JET.OLEDB.4.0"
conx.Open Server.Mappath("database/database.mdb")

set Rs=server.CreateObject("adodb.recordset")

Rs.Open "Select * FROM job",conx, adOpenkeyset, AdLockOptimistic
%>
<html>
<head>
</head>
<body>
<table>
<tr>
<td><b>Type</b></td>
<td>*<b>Date</b></td>
<td>*<b>User ID</b></td>
<td>*<b>shop ID</b></td>
</tr>
<%Do While Not customerRs.EOF%>
<tr>
<td>
<%=Rs("booking_type") & "*"%>
</td>
<td>
<%=Rs("booking_date") & "*"%>
</td>
<td>
<%=Rs("cus_id") & "*"%>
</td>
<td>
<%=Rs("emp_id") & "*"%>
</td>
<%
Rs.MoveNext
Loop%>
</table>
<p>*</p>
<%
Rs.close
set Rs=nothing
set conx=nothing
%>
</body>
</html>
It's just an ASP classic page that displays a table from an access database. So post isn't needed.
 
Back
Top