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 kswisher@iolinc.net (Swisher, Karl)     ******

On Wed, 29 Mar 2000, you wrote:
> ******    message to minivend-users from Hans-Joachim Leidinger <jojo@buchonline.net>     ******
> 
> How about
> 
> [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]
> 
> (not tested)?
> What did your error.log saying?
I've tried this new code.   I do get an error message. It says

	Search pattern not terminated at (eval 104) line 7.

No error was displayed in browser.  Had checked error.log previously when
browser reported an error and made corrections to eliminate them.   
If I change [perl arg=scratch] to [perl arg=scratch interpolate=1] I get

	Safe: syntax error at (eval 104) line 2, near "->'{var1}'"

	 syntax error at (eval 104) line 3, near "->'{var2}'"
in error.log.

This one has me stumped.  Your code looked good to me and felt It should have
worked too.  If I can get though this part  I can then tackle the execution
order of the sql code.

Thanks for you help
Karl
 
> Regards,
> 
> 	Joachim
> 
> 
> -- 
> -------------Hans-Joachim Leidinger---------------------
> 
> 
> -
> 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
-
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: