Here's the actual query: http://pastie.textmate.org/3848916
SELECT SUBSTRING_INDEX( ipaddress, '.', 3 ) AS first_three_octet, count( * ) AS ipCount, updated FROM ips GROUP BY SUBSTRING_INDEX( ipaddress, '.', 3 ) HAVING ipCount = 254 ORDER BY ipCount DESC On Tuesday, May 1, 2012 3:19:27 PM UTC-4, Larry Wapnitsky wrote: > > In a test (non-web2py) program, I'm using a MySQL query that > invokes SELECT SUBSTRING_INDEX. What is the easiest way to convert this to > the proper usage within web2py's DAL specifications? > > Thanks, > Larry >