I have a table containing three columns:

 Int   int            int 
+----+-------------+------------+
| id | serialbegin | serialend  |
+----+-------------+------------+
|  1 | 10          | 20         |
+----+-------------+------------+


And say we have serial number 11. 

Is there a way to SELECT any rows where $my_serial is greater than/equal to
serialbegin and less than/equal to serialend?  

I tried this query: 

SELECT id FROM numbers WHERE serialbegin >= '11' AND serialend <= '11';

Empty set (0.00 sec)


Is this a little more complicated than I'm making it out to be (or am I
missing something obvious)?  

Thanks, 
Michael

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to