Re: [SQL] Double query

2008-02-06 Thread D'Arcy J.M. Cain
On Wed, 06 Feb 2008 16:01:09 -0500 PostgreSQL Admin <[EMAIL PROTECTED]> wrote: > I want to find any value: > > SELECT id FROM schedule WHERE clinic_id = '%s' AND date = '%s' > > But I want to make sure the clinic exist first then find if the date > exist 2nd. I'm not sure what you mean by "firs

[SQL] Double query

2008-02-06 Thread PostgreSQL Admin
Simple question - but my brain is not working: This is my table Column | Type | Modifiers ---++- id| integer

Re: [SQL] Double query (limit and offset)

2005-10-19 Thread Richard Huxton
Michael Landin Hostbaek wrote: List, I'm using the OFFSET / LIMIT combo in order to split up my query, so it only parses 20 rows at a time (for my php-scripted webpage). The best way to do it is to have a layer between your application and the database that can cache the results of your quer

Re: [SQL] Double query (limit and offset)

2005-10-19 Thread Janning Vygen
Am Dienstag, 11. Oktober 2005 17:11 schrieb Michael Landin Hostbaek: > List, > > I'm using the OFFSET / LIMIT combo in order to split up my query, so it > only parses 20 rows at a time (for my php-scripted webpage). > > I'm using two queries; the first basically doing a select count(*) from > [bla

[SQL] Double query (limit and offset)

2005-10-18 Thread Michael Landin Hostbaek
List, I'm using the OFFSET / LIMIT combo in order to split up my query, so it only parses 20 rows at a time (for my php-scripted webpage). I'm using two queries; the first basically doing a select count(*) from [bla bla]; the second grabbing the actual data while setting LIMIT and OFFSET. In a