[Zope] Some mathematical problems ...

Gitte Wange gitte@mmmanager.org
Thu, 10 May 2001 16:28:54 +0200


On Thursday 10 May 2001 16:19, Thomas B. Passin wrote:
> [Gitte Wange]
>
>
> So I guess it is because the oldpriority=_.int(REQUEST.oldpriority)-1)
> doesn't work.
> The values (before the <dtml-call>-statement is:
> id=1
> priority=1
> ServerNetid=2
> oldpriority=2
>
> When the script has been called the values are:
> id=1
> priority=2
> ServerNetid=2
> priority=2 (and this should be 1)
>
> [Tom]
>
> Two things:
>
> 1) Your second example says "priority=2" but I think it meant
> "oldpriority=2" (or 1).  Is that a verbatim cut-and-paste, or is it just a
> typing error?

It was a type error. It should say oldpriority.

> 2) You give the values "when the script has been called" but you don't say
> if those are the actual values that are returned by the form itself.  In
> other words, if you think you are getting the wrong data from the form, you
> need to make sure the form contains and returns the right values.  If it
> doesn't, you need to get the form built correctly first.  If it does, you
> need to make sure you are extracting the vaues from the form correctly.

It isn't a form it's extracted from. I have a link (an <A HREF> that calls 
the script. So I can see that the values there are correct.

> When this part is working correctly - and not before - then you can go on
> to look at the database method and see if it is actually constructed
> correctly
>
> Tom P

Well I knew that it was correct.

I have changed some column names in the database and when I changed the 
variable names according to the column names, it worked. I don't know what 
the problem was - but it is solved now.

Regards,
-- 
************************
Gitte Wange Jensen

System Squid Developer
MMManager Aps
+45 29 72 79 72

gitte@mmmanager.org
************************