[snip]
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';
[/snip]

Since they appear to be INT types, drop the single quotes...

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

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

Reply via email to