Link to home
Start Free TrialLog in
Avatar of net_susan
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("FirstVar",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

%>
ASKER CERTIFIED SOLUTION
Avatar of mpf1748
mpf1748
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial