Gossamer Forum
Home : Products : Gossamer Links : Discussions :

between function

Quote Reply
between function
Hi there,

Does anyone know if between is more efficient/faster in a select statement than
using: 'Date','>=','somedate', 'Date','<=','someotherdate'?


Would this be the correct condition syntax.

my cond = GT::SQL::Condition->new ('Date','Between','somedate AND someotherdate');

I didn't see any documentation on between in the help section.

peace.
Quote Reply
Re: [klangan] between function In reply to
Problem would be it's a dual parameter, ie: BETWEEN and AND

You can read more about it here:

http://www.mysql.com/...rison_Operators.html


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] between function In reply to
Hi Pugdog,
Thanks for that, I had looked there already and discovered the proper select syntax,but couldn't figure out how to get it work with GT syntax (Does GT not support 'between')?

Before anybody digs into this any further...can anyone answer this question first:

Is 'between' faster than two '>=' and '<=' statements.?

I couldn't find that question addressed at mysql.com.

If 'between' is not faster, than there's no point in looking into this any further, but if it is faster, well then, I gotta pursue...

thanks, I'll look forward to hearing from someone.

peace.