[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] little loop question
Quoting Joachim Leidinger (jojo@blackpoint.de):
> Twentys wrote:
> > >> [loop option=color search="
> > >> ra=yes
> > >> fi=products
> > >> ml=50
> > >> tf=color
> > >> "]
> > >>
> > >> <option value="[loop-data products color]"> [loop-data
> > >> products color]</option>
> > >> [/loop]
> > >> </select>
> > >>
> > >> But so I have something like this parameters in my select box
> > >> blu
> > >> yellow
> > >> red
> > >> blu
> ...
> > >Set in your loop:
> > >un= yes
> ....
> > I've already tried, but it doesn't work....
> > any other idea?
> > thanks
>
> Try
>
> [loop option=color searc
> ra=yes
> fi=products
> rf=color
> ml=50
> tf=color
> un=1
> "]
> <option value="[loop-code]"> [loop-code]</option>
> [/loop]
>
This absolutely should work, but I would add:
[loop option=color search="
ra=yes
fi=products
st=db
ml=1000
rf=color
tf=color
un=1
"]
<option value="[loop-code]"> [loop-code]</option>
[/loop]
You have to have a matchlimit as high as your number of products.
Perhaps easier is:
[query list=1
option=color
sql="select distinct color from products order by color"
]<option>[sql-code]
[/query]
--
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH 45013
phone +1.513.523.7621 <mheins@redhat.com>
Any man who is under 30, and is not liberal, has not heart; and any man
who is over 30, and is not a conservative, has not brains.
-- Winston Churchill