This topic is locked

SQL command for between two values

11/5/2006 4:04:41 AM
PHPRunner General questions
G
gdude66 author

Hi,

I have a table events with

event 'id'

staffid

studentid

topic

eventdes

yearlev
what is the sql descriptor for between 0 and 6 as well as equal to?

I have found < and also > as well as the equal but not between two values.

T
thesofa 11/5/2006

Hi,

I have a table events with

event 'id'

staffid

studentid

topic

eventdes

yearlev
what is the sql descriptor for between 0 and 6 as well as equal to?

I have found < and also > as well as the equal but not between two values.



Hi

`event`.`yearlev` BETWEEN '1' AND '3'



will pick up 1, 2 and 3
It appears in the coded pages as yearlev>=1 and yearlev<=3

so when you start hacking, you may not find "between"

HTH