[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] if-sql param
****** message to minivend-users from Murray Gibbins <murray@scotweb.ltd.uk> ******
> Nick Pleis wrote:
>
> Hey,
>
> I'm trying to compare two fields in a returned query to see if they are
> equal..I can't make it work..
>
> It looks something like:
>
> [query sql="select * from somewhere" list=1]
> [if '[sql-param field1]' eq '[sql-param field2]']
> do something
> [/if]
> [/query]
>
> This actually returns true ALL of the time..if I change 'eq' to 'ne' it's
> still true. Anyone know why?:) And what is the proper sytnax for this
> comparison? Using minivned 4.02
>
> Nick
try something like
[sql type="list" query="select field1,field2 form somewhere"]
[if term="[sql-code]" op="eq" compare="sql-param field2"]
do stuff
[/if]
[/sql]
--
____
\__/ Murray Gibbins murray@scotweb.ltd.uk
/ \ Programmer
_ \__/ _ ================================================
\\ || // Scotweb Limited, info@scotweb.ltd.uk
\\||// 13a Albert Terrace, http://www.scotweb.ltd.uk
\||/ Edinburgh EH10 5EA Tel: +44 (0) 131 270 82 33
|| Scotland. Europe. Fax: +44 (0) 7020 93 49 04
-
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