[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: how to do a simple counter loop?
****** message to minivend-users from "Brian T. Allen" <brian@purenetfx.com> ******
Alan,
If the [calc] method works but the only problem is that it shows up in
the page, just stick it in a comment field, which will make it transparent
to the page, but available to minivend.
<!--Code goes here,
Just as normal-->
Hope that helps,
Brian T. Allen
brian@purenetfx.com
>OK, I've just wasted a couple hours on this, I just don't get it...
>
>I need to run a counter while I go through a [sql] loop. Basically, I want
>to do this:
>
>$i = 0
>[sql type=list query="select ..."]
> stuff and nonsense...
> ++$i
>[/sql]
>if $i == 0 then
> there was nothing in the database
>
>I've tried various combos of [calc] (bad since the values show in the page)
>and [if explicit] (which seems to come out false or true invariably).
>
>Is there a standard idiom for running a counter and testing it in this
>circumstance? I couldn't find it in the list archive.
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list