[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] build select box for meta display based on 2 conditions
Quoting Andrei Gologan (agologan@gmx.mis.de):
> Hi
>
> I am using the meta display function to produce a select box with sku´s from
> the inventory table. this works good.
> But it shows me all the sku´s !
> I want it to show only the sku´s that have a quantity greater then 0 (the
> ones that are in stock), so they may get ordered.
>
[display
type=select
lookup_query="
SELECT p.sku, p.description
FROM inventory as i, products as p
WHERE i.sku = p.sku
AND i.qty > 1
"]
or something of that nature.
I am not sure if that works on 4.8, though I believe it should.
It definitely works on 4.9.
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike@perusion.com>
For a successful technology, reality must take precedence over public
relations, for Nature cannot be fooled. -- Dick Feynman