I have a sql table containing GBP prices and I was wondering if there is a way to pull out these prices, convert them to EURO prices and then to display them on a webpage as EURO prices?
is this even possible?
p.s I dont have a problem pulling out the prices using asp/sql - I just need to know if they can be converted and pulled out as I would prefer to avoid creating multiple tables.
my code
thanks in advance,
Omar.
is this even possible?
p.s I dont have a problem pulling out the prices using asp/sql - I just need to know if they can be converted and pulled out as I would prefer to avoid creating multiple tables.
my code
Code:
<%
'DISPLAY PRICES
DIM objConn19and20
Set objConn19and20 = MYCONNGOESHERE
DIM FLIGHTROUTES19and20
FLIGHTROUTES19and20 = "SELECT * FROM MYTABLENAMEGOESHERE
DIM objRS19and20
Set objRS19and20 = MYCONNGOESHERE
If objRS19and20.Eof Then
'This checks to see if we are at end of file (eof) for the returned recordset
'if we are there were no records we tell them that
Response.write "<div align='center'>Sorry there are no current records.</div>"
Else
Response.Write "<table align=""center"" id=""flightspecialscontainer"" cellpadding=""0"" cellspacing=""0"">"
Response.Write "<tr><td>"
'start a loop that will go until the eof
Do while not objRS19and20.Eof
'if there were records lets do something with them
'write some table setup
Response.Write "<table align=""center"" cellpadding=""0"" cellspacing=""0"" id=""flightspecialroutetable"">"
Response.Write "<tr><td>" & objRS19and20("Anchor_Tag") & vbCrLf & "<fieldset class=""fieldsetspecialpricebox"">" & vbCrLf
Response.Write "<legend>" & vbCrLf & "<span class=""specialtitlesmall"">" & objRS19and20("Flight_Route") & "</span>" & vbCrLf & "</legend>" & vbCrLf
Response.Write "<table align=center cellpadding=0 cellspacing=0 class=""specialpricetable"">" & vbCrLf
Response.Write "<tr>" & vbCrLf & "<td class=""priceheadertd"">Price</td>" & vbCrLf
Response.Write "<td class=""dateheadertd"">Outbound Date/s</td></tr>" & vbCrLf
Response.Write "<tr><td colspan=2 height=10> </td></tr>" & vbCrLf
'write your table content
Response.Write "<tr>" & vbCrLf & "<td class=""pricetd"">£" & objRS19and20("Price_Band_1") & "</td>" & vbCrLf
Response.Write "<td class=""datetd""><span class=""monthspan"">" & objRS19and20("Month_Band_1") & " </span>" & objRS19and20("Date_Band_1") & "</td>" & vbCrLf & "</tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf & "<td class=""pricetd"">£" & objRS19and20("Price_Band_2") & "</td>" & vbCrLf
Response.Write "<td class=""datetd""><span class=""monthspan"">" & objRS19and20("Month_Band_2") & " </span>" & objRS19and20("Date_Band_2") & "</td>" & vbCrLf & "</tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf & "<td class=""pricetd"">£" & objRS19and20("Price_Band_3") & "</td>" & vbCrLf
Response.Write "<td class=""datetd""><span class=""monthspan"">" & objRS19and20("Month_Band_3") & " </span>" & objRS19and20("Date_Band_3") & "</td>" & vbCrLf & "</tr>" & vbCrLf
Response.Write "<tr>" & vbCrLf & "<td class=""pricetd"">£" & objRS19and20("Price_Band_4") & "</td>" & vbCrLf
Response.Write "<td class=""datetd""><span class=""monthspan"">" & objRS19and20("Month_Band_4") & " </span>" & objRS19and20("Date_Band_4") & "</td>" & vbCrLf & "</tr>" & vbCrLf
'end table setup
Response.Write "<td colspan=""2"" class=""specialbookbuttontd""><a class=""button"" href=""#BackToTop"" onClick=""change_booking(" & objRS19and20("Book_Button") & ")"">BOOK NOW !</a></td>"
Response.Write "</tr>" & vbCrLf & "</table>" & vbCrLf & "</fieldset>" & vbCrLf
Response.Write "</td></tr></table>" & vbCrLf & vbCrLf
'move to the next record in the recordset
objRS19and20.movenext
Loop
end if
'close out your table
Response.Write "</td>" & vbCrLf & "</tr>" & vbCrLf & "</table>" & vbCrLf
objRS19and20.Close
Set objRS19and20 = Nothing
objConn19and20.Close
Set objConn19and20 = Nothing
%>
Omar.
Comment