As long as web2py "goes", it issues a select to your database engine and that one is responsible for picking up the records you want. Is the select generated by web2py correct ? If yes, then it's a problem either with your backend or your data. If not, then pack an app to reproduce the issue.
PS: are you sure that you are NOT using SQLite and changed that column from an original "string" to the "integer" type ? If you did, then the issue is right there: SQLite doesn't handle column type migrations. On Thursday, April 25, 2013 6:17:53 PM UTC+2, David S wrote: > > I've got a query which looks like this: > > (db.tracking.number >= 0) & (db.tracking.number <= 22000) > > where number is an integer. And this should select everything with > numberbetween 0 and 22000 but it doesn't. For example, if I set the query to > just > > (db.tracking.number >= 0) > > as expected it grabs anything with a number greater than or equal to 0 > and I can see all the data. However, if I set it to > > (db.tracking.number >= 250) > > it grabs everything greater than 250, less than 1000, and will also pick > up numbers where if a trailing zero was added, it would be within the range > (ex: 26->260, 27->270, 28->280, 29->290, 30->300, ... ). > > I have some strings formatted like this: X##### which I use re.sub to > remove characters and then use int() to convert the remaining number to a > int before ever being put into the table. I've checked to make sure > everything really is an integer before going into the table and it all > seems to be OK. I'm not sure if this is a python quirk, SQL quirk, or a > web2py quirk. Any suggestions? > > Thanks, > David > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.