0 Replies Latest reply on Apr 20, 2007 11:24 PM by (Paul_Taylor)

    Simple click counter - how to

      Trying to create a simple ad click counter
      ie
      click ad on page.php - ad has record ID
      go to
      adprocessingpage.php with ID in URL

      put update transaction on page (maybe this is the wrong approach??)
      update record where ID matches
      when finished go to URL - also sotred in that ads record

      2 problems

      1
      can't see how to increment field value
      I can get the value in a recordset - but cant find the syntax to increment

      (recordset called rs_sel_ad)

      $upd_advert_adv->addColumn("clicks_adv", "NUMERIC_TYPE", "VALUE", "{rs_sel_ad.clicks_adv}");

      what I need is {rs_sel_ad.clicks_adv}={rs_sel_ad.clicks_adv}+1

      2
      the go to URL is taken from that record
      but the page goes to (website base url) + recordset URL

      http://testserver/http%3A%252F%252Fwww.advertiser.com

      I just need the recordset URL
      http://www.advertiser.com

      any help appreciated

      Paul