[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] [perl] question
Just replace 'EOF' with "EOF" and it will work
At 01:01 22/11/99 -0700, Mike Gross wrote:
>****** message to minivend-users from Mike Gross
><mike@jensalt.com> ******
>
>I'm having some problems with some perl script on a page. The page is a
>modified version of the flypage.html that comes with minivend. The perl
>makes a sql query to the database and retrieves all of the related products
>info for a given product using a minivend [sql] tag. The related products
>info contains a field that has product codes seperated by ;'s. The perl
>takes these product codes and places them in an array, and uses this array
>to setup the links to the other products specified by the product codes.
>The problem comes when the perl tries to pull the description info out of
>the database for the product codes. The code works similar to this:
>
>foreach $itemcode (@related_products) {
> my $productdescriptionhash=<<'EOF';
> [sql type=hash][arg]$itemcode[/arg]select description from products
>where product_id = %s[/sql]
>EOF
>
>(more code)
>
>The problem is that the sql query is processed to be:
>
>select description from products where product_id = $itemcode
>
>where $itemcode is literaly $itemcode instead of the value of $itemcode.
>
>My question is how can I get minivend to process the perl variable before
>it processes the [sql] tags?
>Is it even possible?
>
>Or is there another better way to display multiple related items on a page
>without resorting to a perl script?
>
>
>-
>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
Nathan ZYLBERSZTEJN
G.S.M:+32/(0)75-97-91-72
E-mail:zyloo@zylooplanet.net
____________________
ZylooPlaNet
79 rue Guillaume STOCQ
1050 BRUXELLES
Tel./Fax.: +32/2-646-77-46
Hébergez gratuitement le site de votre entreprise
http://www.zylooplanet.net