I think this would be the proper title for the problem im currently having.
Just a jyst of what the problem im running into is....
1) This page was coded by yet again the same employee whom used to work here a few years back, with time, we need to update.
2) The problem is, we used to only ship via UPS, but now that we offer shipping through other means. However, the page I am working on only allows for orders with UPS tracking numbers to show.
Example
Order Number Status Tracking Number
9999999 Shipped 1ZXXXXXXXXXX
9999998 Shipped
From the top we see that it will show the UPS but not the USPS order. I changed the code up and was able to switch it around vice versa and was dumbfounded as to why it wouldnt show both.
Now that ive confirmed that both items are in two different tables of the db I can figure out how to code it so that I can access both tables, while retaining information from both. (Am I even making any sense?)
Heres a portion of the code.
Thanks in advance everyone,
Gregory Gawaran
Just a jyst of what the problem im running into is....
1) This page was coded by yet again the same employee whom used to work here a few years back, with time, we need to update.
2) The problem is, we used to only ship via UPS, but now that we offer shipping through other means. However, the page I am working on only allows for orders with UPS tracking numbers to show.
Example
Order Number Status Tracking Number
9999999 Shipped 1ZXXXXXXXXXX
9999998 Shipped
From the top we see that it will show the UPS but not the USPS order. I changed the code up and was able to switch it around vice versa and was dumbfounded as to why it wouldnt show both.
Now that ive confirmed that both items are in two different tables of the db I can figure out how to code it so that I can access both tables, while retaining information from both. (Am I even making any sense?)
Heres a portion of the code.
Code:
i = 0
if not rstemp.eof then
set rs = createobject("adodb.recordset")
do until rstemp.eof OR howmanyrecs>=maxrecs
invoice_id = rstemp("unique_key")
invoice_status = rstemp("invoice_status")
invoice_tracking = ""
set rs = createobject("adodb.recordset")
rs.open "select * from invoices where invoice_tracking = '" & rstemp("invoice_tracking") & "'",strDSN,3,1
if not rs.eof then
if isnull(rs("invoice_tracking")) or rs("invoice_tracking") = null then
invoice_tracking = "NO TRACKING # YET"
else
invoice_tracking = rs("invoice_tracking")
end if
end if
x_1 = x_1 + 1
row_name = "abc" & trim(rstemp("invoice_tracking")) & "_" & x_1
row_name = replace(row_name," ","")
row_name = replace(row_name,".","")
row_name = replace(row_name,"'","")
row_name = replace(row_name,"@","")
row_name = replace(row_name,"?","")
row_name = replace(row_name,"%","")
row_name = replace(row_name,"!","")
row_name = replace(row_name,"#","")
row_name = replace(row_name,"$","")
row_name = replace(row_name,"^","")
row_name = replace(row_name,"*","")
row_name = replace(row_name,"(","")
row_name = replace(row_name,")","")
row_name = row_name & "_" & i
i = i + 1
if i mod 2 = 0 then
response.write "<tr bgcolor='#cccccc'>"
else
response.write "<tr bgcolor='#ffffff'>"
end if
if instr(invoice_tracking,"1Z5354RV") then
invoice_tracking = "<a href=pages_x_orders_tracking.asp?rid=" & invoice_tracking & ">" & invoice_tracking & "</a>"
end if
if instr(invoice_tracking,"1Z2Y3656") then
invoice_tracking = "<a href=pages_x_orders_tracking.asp?rid=" & invoice_tracking & ">" & invoice_tracking & "</a>"
end if
if instr(invoice_tracking,"9101") then
invoice_tracking = "<a href=pages_x_orders_tracking.asp?rid=" & invoice_tracking & ">" & invoice_tracking & "</a>"
end if
response.write "<font size='2'>"
response.write "<td valign='top'><font face='Arial' size='2'>" & invoice_id & "</font></td>"
response.write "<td valign='top'><font face='Arial' size='2'>" & invoice_status & "</font></td>"
response.write "<td valign='top'><font face='Arial' size='2'>" & invoice_tracking & "</font></td>"
response.write "</font></tr>"
Gregory Gawaran
Comment