[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
need help getting fields from non 'products' table (SQL)
Hello,
I managed to get Minivend to talk to MySQL and get data out of 'products'
table which in our case contains these 3 columns: product_id, product_name,
product_desc.
Another table, 'product_term' contains info about various prices for each
product and I'm trying to pull some of those prices from there...and I need
some help with that.
- First I tried:
[item-data product_term our_retail_price] -- didn't work (tags not showing)
(as example in
http://www.minivend.com/minivend/minivend-list/1999/msg03447.html)
- The I tried:
[data product_term our_retail_price] -- didn't work (tags not showing)
(as example in
http://www.minivend.com/minivend/minivend-list/1997/1122.html)
- Then I tried:
[sql type=list query="select * from product_term where product_id =
'[item-code]'"] [sql-param 7]
[sql-field our_retail_price]
[/sql]
The 'sql-param' line worked, but I don't like using it because the order
number of 'our_retail_price' field can change.
The 'sql-field' line did not work - I got a blank (nothing), even though the
field is not NULL/empty in DB (checked).
What is the best way to get values of fields/columns from other (not
'products') tables in an SQL setup?
Thank you,
Otis