[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] need help getting fields from non 'products' table (SQL)
On Sat, 16 Oct 1999, Otis Gospodnetic wrote:
> - 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).
Don't use select *, use select our_retail_price from produst_term ...
instead. That way you do not need to worry about changes to the
table breaking your code.
Dan
--
Dan Busarow 949 443 4172
Dana Point Communications, Inc. dan@dpcsys.com
Dana Point, California 83 09 EF 59 E0 11 89 B4 8D 09 DB FD E1 DD 0C 82