division problem with webdatablade 4.0
Posted in 2000
Topics: General Discussion
Hello I have some troubles with the divide operator in the webdatablade 4.0 module. As soon as I try to divide a value the whole appPage is completely messed up. I'm trying to do the following statement: <?MISQL ERR=CM_ERROR_HANDLER SQL="SELECT count(*) FROM rubriken WHERE rubriken.feinrubrikid = @RUBRIKID@ and rubriken.rubrikid IN (SELECT rubrikid FROM artikel WHERE ausgabeid = @AUSGABEID@ ) and rubriken.art = 2;"> $(SETVAR,$division,$(/,$1,3)) $(SETVAR,$division,$(ROUND,$division,0)) <?/MISQL> It seems to me that the parser has some troubles with the / sign. The appPages runs fine when I let run the statement alone in a appPage. In conjunction with other instructions in the appPage the webblade driver always complains for errors where no errors are. These errors are not reported when I don't use the divide operator (i.e. by setting a constant value). The same thing happens when I try to divide in the SELECT clause (select count(*) / 3) Any hints, suggestions? Thanks Herbie
i tried this page <html> <body> <center> <h3> test of division problem </h3> <?MIBLOCK COND=$(XST,$action)> <?mivar name=division><?/mivar> <?MISQL SQL="SELECT count(*) FROM WBpages;"> <?mivar>position 1 is now $1<?/mivar> $(SETVAR,$division,$(/,$1,3)); <?mivar>division is now $division <?/mivar> $(SETVAR,$division,$(ROUND,$division,0)) <?mivar>division after round is now $division <?/mivar> <?/MISQL> <?/MIBLOCK> <FORM METHOD=POST ACTION=<?MIVAR>$WEB_HOME<?/MIVAR>> <INPUT TYPE=HIDDEN NAME=action value=on> <INPUT TYPE=HIDDEN NAME=MIval VALUE=division_problem.html> <P> <input type=reset > <input type=submit> </form> <HR> </body> </html> and got good results : test of division problem position 1 is now 49.0000000000000000 ; division is now 16.333333333333333333333 division after round is now 16 maybe one of your dynamic tags is screwing up the results? Herbert Liechti wrote: > Hello > > I have some troubles with the divide operator in the > webdatablade 4.0 module. As soon as I try to divide > a value the whole appPage is completely messed up. > > I'm trying to do the following statement: > > <?MISQL ERR=CM_ERROR_HANDLER SQL="SELECT count(*) > FROM rubriken > WHERE rubriken.feinrubrikid = @RUBRIKID@ > and rubriken.rubrikid IN (SELECT rubrikid > FROM artikel WHERE ausgabeid = @AUSGABEID@ ) > and rubriken.art = 2;"> > $(SETVAR,$division,$(/,$1,3)) > $(SETVAR,$division,$(ROUND,$division,0)) > <?/MISQL> > > It seems to me that the parser has some troubles with > the / sign. The appPages runs fine when I let run the > statement alone in a appPage. In conjunction with other > instructions in the appPage the webblade driver always > complains for errors where no errors are. These errors are > not reported when I don't use the divide operator (i.e. by > setting a constant value). The same thing happens when > I try to divide in the SELECT clause (select count(*) / 3) > > Any hints, suggestions? > Thanks Herbie
> Herbert Liechti wrote: > > > Hello > > > > I have some troubles with the divide operator in the > > webdatablade 4.0 module. As soon as I try to divide > > a value the whole appPage is completely messed up. > > > > I'm trying to do the following statement: > > > > <?MISQL ERR=CM_ERROR_HANDLER SQL="SELECT count(*) > > FROM rubriken > > WHERE rubriken.feinrubrikid = @RUBRIKID@ > > and rubriken.rubrikid IN (SELECT rubrikid > > FROM artikel WHERE ausgabeid = @AUSGABEID@ ) > > and rubriken.art = 2;"> > > $(SETVAR,$division,$(/,$1,3)) > > $(SETVAR,$division,$(ROUND,$division,0)) > > <?/MISQL> > > > > It seems to me that the parser has some troubles with > > the / sign. The appPages runs fine when I let run the > > statement alone in a appPage. In conjunction with other > > instructions in the appPage the webblade driver always > > complains for errors where no errors are. These errors are > > not reported when I don't use the divide operator (i.e. by > > setting a constant value). The same thing happens when > > I try to divide in the SELECT clause (select count(*) / 3) > > > > Any hints, suggestions? > > Thanks Herbie Looks OK, what happens if you hard code the where clause, and just html/body tags in - does the page build OK? -- Paul Watson # WF Software Ltd # You are only young once Tel: +44 1436 674729 # but you can be immature Fax: +44 1436 678693 # for ever www.wfsoftware.com #