Forums

This topic is locked

Conditional Update

Posted 31 Oct 2002 11:56:36
1
has voted
31 Oct 2002 11:56:36 Q Qwerty posted:
I got the following piece of code on my redirect.asp page:

<pre id=code><font face=courier size=2 id=code>
&lt;%
If (Request.QueryString("Produkt" &lt;&gt; "" Then
Response.Redirect(rsProdukten.Fields.Item("URL".Value) and
rsProdukten("Clicks" = rsProdukten.Fields.item("Clicks" + 1
rsProdukten.Update
End If
%&gt;
&lt;%
If (Request.QueryString("Prijsvraag" &lt;&gt; "" Then
Response.Redirect(rsPrijsvragen.Fields.Item("URL".Value) and
rsPrijsvragen("Clicks" = rsPrijsvragen.Fields.item("Clicks" + 1
rsPrijsvragen.Update
End If
%&gt;
&lt;%
If (Request.QueryString("Aanbieding" &lt;&gt; "" Then
Response.Redirect(rsAanbiedingen.Fields.Item("URL".Value) and
rsAanbiedingen("Clicks" = rsProdukten.Fields.item("Clicks" + 1
rsPrijsvragen.Update
End If
%&gt;
&lt;%
If (Request.QueryString("Proefabonnement" &lt;&gt; "" Then
Response.Redirect(rsProefabonnement.Fields.Item("URL".Value) and
rsProefabonnementen("Clicks" = rsProefabonnementen.Fields.item("Clicks" + 1
rsProefabonnementen.Update
End If
%&gt;
</font id=code></pre id=code>



The redirection works, but the field Clicks in one of the four tables needs to be updated based on the URL the user is redirected to. Someone with the solution?

Reply to this topic