[web2py] Re: Building a nested query in place

2012-11-30 Thread Wes Hall
I hadn't thought about that. My first thought is that I'd like to keep as much as possible within web2py for portability, but I will have to look at that possibility. Thanks. On Tuesday, November 27, 2012 2:21:09 PM UTC-5, Derek wrote: > > For this kind of thing, triggers are great. > > On Tuesda

[web2py] Re: Building a nested query in place

2012-11-27 Thread Derek
For this kind of thing, triggers are great. On Tuesday, November 27, 2012 10:23:13 AM UTC-7, Wes Hall wrote: > > Understood, this is a database issue. My expense comment was referring to > frequently checking the db for changes, not the actual query. > > Friendly names should < 10, teacher list

[web2py] Re: Building a nested query in place

2012-11-27 Thread Wes Hall
Understood, this is a database issue. My expense comment was referring to frequently checking the db for changes, not the actual query. Friendly names should < 10, teacher list should remain < 1000. It does sound as though my best bet is to monitor the "friendly name" manage page, and on inser

[web2py] Re: Building a nested query in place

2012-11-27 Thread Massimo Di Pierro
This is not really a web2py issue. This is a database issue. Who would you do this efficiently with SQL? Unless you store the flag, you can try using regex search. It will only work with some databases and it may not be more efficient. How many friendly names do you have? On Tuesday, 27 Novembe

[web2py] Re: Building a nested query in place

2012-11-27 Thread Wes Hall
Since I obfuscated the real application, I can't fault this answer. However, in the current usage, it doesn't feel like the best solution. Teachers are being inserted into the database from outside Web2Py, while the friendly names are managed from within (and might change frequently, which woul

[web2py] Re: Building a nested query in place

2012-11-27 Thread Massimo Di Pierro
I would suggest that when a user register you check if they have "friendly sounding" first name and flag it, then search using the flag. On Tuesday, 27 November 2012 09:48:48 UTC-6, Wes Hall wrote: > > I want to select teachers that have taught for more than one year, are > getting paid and have