net_susan
asked on
Combine my statements
Please help me combine the following; any advice would be helpful.
<%
on error resume next
dim connTemp, rsTemp, mySQL
pFirstVar = getSessionVariable("FirstV ar",0)
pSecondVar = request("pSecondVar")
pDate=MediumDate(Date())
if 1=1 then
mySQL="UPDATE table1 SET ColumnOne=ColumnOne+1 WHERE FirstVar="&pFirstVar& "AND SecondVar="&pSecondVar
call updateDatabase(mySQL, rsTemp, "table1Exec.asp")
mySQL="UPDATE table1 SET ColumnOne=1 WHERE ColumnOne IS NULL AND FirstVar="&pFirstVar& "AND SecondVar="&pSecondVar
call updateDatabase(mySQL, rsTemp, "table1Exec.asp")
mySQL="UPDATE table1 SET ColumnTwo=' "&pDate& "' WHERE FirstVar="&pFirstVar& "AND SecondVar="&pSecondVar
call updateDatabase(mySQL, rsTemp, "table1Exec.asp")
mySQL="UPDATE table1 SET FirstViewed=' "&pDate& "' WHERE FirstViewed IS NULL OR FirstViewed='' AND FirstVar="&pFirstVar& "AND SecondVar="&pSecondVar
call updateDatabase(mySQL, rsTemp, "table1Exec.asp")
end if
%>
<%
on error resume next
dim connTemp, rsTemp, mySQL
pFirstVar = getSessionVariable("FirstV
pSecondVar = request("pSecondVar")
pDate=MediumDate(Date())
if 1=1 then
mySQL="UPDATE table1 SET ColumnOne=ColumnOne+1 WHERE FirstVar="&pFirstVar& "AND SecondVar="&pSecondVar
call updateDatabase(mySQL, rsTemp, "table1Exec.asp")
mySQL="UPDATE table1 SET ColumnOne=1 WHERE ColumnOne IS NULL AND FirstVar="&pFirstVar& "AND SecondVar="&pSecondVar
call updateDatabase(mySQL, rsTemp, "table1Exec.asp")
mySQL="UPDATE table1 SET ColumnTwo=' "&pDate& "' WHERE FirstVar="&pFirstVar& "AND SecondVar="&pSecondVar
call updateDatabase(mySQL, rsTemp, "table1Exec.asp")
mySQL="UPDATE table1 SET FirstViewed=' "&pDate& "' WHERE FirstViewed IS NULL OR FirstViewed='' AND FirstVar="&pFirstVar& "AND SecondVar="&pSecondVar
call updateDatabase(mySQL, rsTemp, "table1Exec.asp")
end if
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.