Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Conditional comparison of the value of two variables



******    message to minivend-users from Stefan Hornburg <racke@linuxia.de>     ******

Hans-Joachim Leidinger <jojo@buchonline.net> writes:


[...]

> 
> [set name="var1" interpolate=1][value pass_var1][/set]
> [set name="var2" interpolate=1][value pass_var2][/set]
> 
> [perl arg=scratch]
>           $a = $Safe{'scratch'}->'{var1}';
>           $b = $Safe{'scratch'}->'{var2}';
>           if ($a eq $b) {
>                  [sql type=set interpolate=1]
>                          update recotable_tbl set var1=[scratch var1]
> where trim(recoid) ='[value pass_recoid]'
>                  [/sql]
>                  return "Update was successful";
>          } else {
>                  return "Update was not successful";
>             }
> 
> [/perl]

MiniVend first interpolate the sql-Tag, then the perl Tag, so this
could not work as desired.

Ciao
        Racke

-- 
LinuXia Systems, eCommerce and more => http://www.linuxia.de/ or 0511-3941290.
Unsere Partner: Cobolt NetServices (http://www.cobolt.net), CAPCON Systemhouse
(http://www.capcon-systemhouse.com), ecoservice gmbh (http://www.ecoservice.de)
Unser Fokus liegt auf Open-Source-Software (MiniVend, Debian GNU/Linux, etc.)

-
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


Search for: Match: Format: Sort by: