Hi and thanks to all who responded to my question!

On Wednesday 19 February 2003 23:32, Matt Sergeant wrote:
> On Wednesday, Feb 19, 2003, at 20:58 Europe/London, Kjetil Kjernsmo
> > When you code an exists or process sub in a Provider, that check
> > against
> > a database to see if the entry you're after exists, how do you do
> > that...?

> Either do "select 1 from ..." which should theoretically be
> optimised, or load all your data in during init(). 

You set me onto a track that I think will work very well. 

I found that I would always have to retrieve a modification date from 
the db for mtime purposes, and while I hadn't intended to require all 
entries to have a modification date, it really didn't matter. 

So, what I do now is to retrieve the modification time from the DB in 
init, and if it doesn't exist, I conclude that the entry doesn't exist. 

Best,

Kjetil
-- 
Kjetil Kjernsmo
Astrophysicist/IT Consultant/Skeptic/Ski-orienteer/Orienteer/Mountaineer
[EMAIL PROTECTED]  [EMAIL PROTECTED]  [EMAIL PROTECTED]
Homepage: http://www.kjetil.kjernsmo.net/        OpenPGP KeyID: 6A6A0BBC


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to