in reply to Re: Troubleshooting help...
in thread Troubleshooting help...

Thank you. I'm very sure of the i,h, and s. I know that, because it's a enum("i","h","s") i=impression, h=hit(click), s=sale

</td /> Is not that the way CGI.pm prints a table? I once asked why, and they said it was for DHTML, or XML or something like that. That is why I do that.

I dunno ;o)

Anyways, I made a mistake with what is wrong. It is adding them correctly, I forgot this was on the daily report, so the ones I added, went in with a timestamp different from the days I was looking at, so I changed days to today, and they are added up correctly, however, I get 0% from the division.

So, I guess that is the only problem now.

Should I get rid of the </td /> and just use the regular code?

thx,
Richard

Replies are listed 'Best First'.
Re: Re: Re: Troubleshooting help...
by dws (Chancellor) on Feb 15, 2003 at 19:58 UTC
    I changed days to today, and they are added up correctly, however, I get 0% from the division.

    The way your logic is set up, only one of $tracked_click or $tracked_impressions will be 1 when

    ($tracked_click*1) / ($tracked_impressions*1)
    is executed. The other will be zero. You're either going to divide zero by one, giving zero, or you're going to divide by zero. Is this really what you want to do?

    Should I get rid of the </td /> and just use the regular code?

    You should use </td>. The "trailing slash" form of tags is reserved for those tags that are not paired, like <br/>.

      Ok, I fixed it. I was using two different variables for the tracked_clicks I was not putting the ending s on it, when doing the dividing.

      Duh ;(
      I cannot believe I missed that;o)

      MANY Thanks for the help everyone!

      Thx,
      Richard