On Fri, Jun 13, 2008 at 11:20 AM, Winfred Peereboom <[EMAIL PROTECTED]> wrote: > > Hello, > > Fiest message to the developers mailing list, so i would like to introduce > myself. > > I am working at VNUMedia. We use MMBASe for so many years..... I am just > working for 2 years at vnu. > Please ask ask if you hava any other question sabout me. > > My first question. We are working with mmbase 1.8 on a tomcat webserver. > When i look at the mmbase logs i see that 99 % is about query's that make > use of a bp_po.pos % 2 != 0. This is for having all odd records. Mmbase is > falling to basiclegacy because it doesn't understand the % symbol. When i > change it so normal mysql functions like mod() it also produces an error in > the logs. > How can i fix this. I prefer a way to do this thru the query and not by > using the mm:odd or mm:even code , because a lot of code is the same, and i > don't have a really good example for using these mm tags. > > thanks for any reply, and for those who are bbq-ing this evening -- good > luck with nl-fr ;)
We have no support for the mod-operator. Though it would not hard to add. Add a wish to jira, and I'll see what I can do. I'm not sure why you want to query only odd positioned items though, that seems pretty odd. But anyhow, if you want to use mm:odd: <mm:listnodes>.. <mm:odd> executes only on odd items </mm:odd> </mm:listnodes> This works too, and is often more convenient: <mm:list varStatus="status"> <div class="${status.index %2 eq 0 'even' : 'odd'}"> </div> </mm:list> Though perhaps the varStatus attribute (copied from c:forEach) is available only in mmbase >= 1.8.6, Michiel -- mihxil' http://meeuw.org nl_NL eo_XX en_US _______________________________________________ Developers mailing list Developers@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/developers