View Single Post
Old 09-26-2012, 09:45 PM   PM User | #3
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,210
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Oh, heck. I can't stand it.
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DRIVER={MySQL}; SERVER=#####; DATABASE=temple; User=#####;PASSWORD=#####; OPTION=3;"

id = 0
On Error Resume Next
   id = CLNG( Request("id") )
On Error GoTo 0

SQL = "SELECT * FROM orders WHERE orderid = " & id
Set Recordset1 = conn.Execute( SQL )
If Recordset1.EOF Then
     conn.Close
     Response.Write "Invalid id passed from previous page."
     Response.End
End If

... now work with the recordset ...
%>
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote