bumcheekcity
06-04-2004, 05:28 PM
<%
dim strid, strquery, intnumrows, intcount, strorderplaced
dim userid(), quantity(), medicineid(), username(), medid2(), description(), dateplaced(), datedispatched(), datearrived(), orderid()
strid = session("id")
strquery = "SELECT * FROM orders WHERE chemist_id = "&strid&" AND collected = 0"
objrecordset.open strquery,objdatabase,1,2
intnumrows = objrecordset.recordcount
redim userid(intnumrows)
redim quantity(intnumrows)
redim medicineid(intnumrows)
redim description(intnumrows)
redim username(intnumrows)
redim dateplaced(intnumrows)
redim datedispatched(intnumrows)
redim datearrived(intnumrows)
redim orderid(intnumrows)
intcount = 0
Do while not objrecordset.eof
userid(intcount) = objrecordset("user_id")
quantity(intcount) = objrecordset("quantity")
medicineid(intcount) = objrecordset("medicine_id")
dateplaced(intnumrows) = objrecordset("date_placed")
datedispatched(intnumrows) = objrecordset("date_dispatched")
datearrived(intnumrows) = objrecordset("date_arrived")
orderid(intnumrows) = objrecordset("order_id")
intcount = intcount + 1
objrecordset.movenext
Loop
objrecordset.close
intcount= 0
do while not intcount=intnumrows
strquery="SELECT description FROM medicine WHERE medicine_id ='"&medicineid(intcount)&"'"
objrecordset.open strquery,objdatabase,1,2
description(intcount) = objrecordset("description")
objrecordset.close
intcount = intcount + 1
Loop
intcount = 0
do while not intcount=intnumrows
strquery="SELECT username FROM users WHERE user_id ='"&userid(intcount)&"'"
objrecordset.open strquery,objdatabase,1,2
username(intcount) = objrecordset("username")
objrecordset.close
intcount = intcount + 1
Loop
strorderplaced = "orderplaced.asp?id="&strid&"&who="&strwho
%>
<form method="post" action="orderhistorydone.asp" onsubmit="return FrontPage_Form2_Validator(this)" language="JavaScript" name="FrontPage_Form2">
<p align="left">Please Select a Prescription: <br>
<%
intcount = 0
Do while not intcount = intnumrows
response.write "<br>Medicine: "&description(intcount)&"</td>"
response.write "<br>User ID: "&username(intcount)&"</td>"
response.write "<br>Date Placed: "&dateplaced(intcount)&"</td>"
response.write "<br>Date Dispatched: "&datedispatched(intcount)&"</td>"
response.write "<br>Date Arrived: "&datearrived(intcount)&"</td><br>"
response.write "<input type='radio' value='"&orderid(intcount)&"' name='rdoorderid'><br><br>"
intcount = intcount + 1
Loop
%>
<input type="submit" value="Submit" name="B1"> </p>
</form>
This produces the usrnames and descriptions of what I want fine, but the dates won't display. Am I doing something wrong, and will dates not display like normal text in an array?
dim strid, strquery, intnumrows, intcount, strorderplaced
dim userid(), quantity(), medicineid(), username(), medid2(), description(), dateplaced(), datedispatched(), datearrived(), orderid()
strid = session("id")
strquery = "SELECT * FROM orders WHERE chemist_id = "&strid&" AND collected = 0"
objrecordset.open strquery,objdatabase,1,2
intnumrows = objrecordset.recordcount
redim userid(intnumrows)
redim quantity(intnumrows)
redim medicineid(intnumrows)
redim description(intnumrows)
redim username(intnumrows)
redim dateplaced(intnumrows)
redim datedispatched(intnumrows)
redim datearrived(intnumrows)
redim orderid(intnumrows)
intcount = 0
Do while not objrecordset.eof
userid(intcount) = objrecordset("user_id")
quantity(intcount) = objrecordset("quantity")
medicineid(intcount) = objrecordset("medicine_id")
dateplaced(intnumrows) = objrecordset("date_placed")
datedispatched(intnumrows) = objrecordset("date_dispatched")
datearrived(intnumrows) = objrecordset("date_arrived")
orderid(intnumrows) = objrecordset("order_id")
intcount = intcount + 1
objrecordset.movenext
Loop
objrecordset.close
intcount= 0
do while not intcount=intnumrows
strquery="SELECT description FROM medicine WHERE medicine_id ='"&medicineid(intcount)&"'"
objrecordset.open strquery,objdatabase,1,2
description(intcount) = objrecordset("description")
objrecordset.close
intcount = intcount + 1
Loop
intcount = 0
do while not intcount=intnumrows
strquery="SELECT username FROM users WHERE user_id ='"&userid(intcount)&"'"
objrecordset.open strquery,objdatabase,1,2
username(intcount) = objrecordset("username")
objrecordset.close
intcount = intcount + 1
Loop
strorderplaced = "orderplaced.asp?id="&strid&"&who="&strwho
%>
<form method="post" action="orderhistorydone.asp" onsubmit="return FrontPage_Form2_Validator(this)" language="JavaScript" name="FrontPage_Form2">
<p align="left">Please Select a Prescription: <br>
<%
intcount = 0
Do while not intcount = intnumrows
response.write "<br>Medicine: "&description(intcount)&"</td>"
response.write "<br>User ID: "&username(intcount)&"</td>"
response.write "<br>Date Placed: "&dateplaced(intcount)&"</td>"
response.write "<br>Date Dispatched: "&datedispatched(intcount)&"</td>"
response.write "<br>Date Arrived: "&datearrived(intcount)&"</td><br>"
response.write "<input type='radio' value='"&orderid(intcount)&"' name='rdoorderid'><br><br>"
intcount = intcount + 1
Loop
%>
<input type="submit" value="Submit" name="B1"> </p>
</form>
This produces the usrnames and descriptions of what I want fine, but the dates won't display. Am I doing something wrong, and will dates not display like normal text in an array?