RE: Query with dynamic criterias?

2007-08-07 Thread Marc Quattrini
To: CF-Talk Subject: Re: Query with dynamic criterias? Is there a reason why you are doing this in two queries instead of one query with a join? On 8/7/07, Marc Quattrini <[EMAIL PROTECTED]> wrote: > > Hi Charlie, > > The problem seems to be with the "OR 1=1" statemen

RE: Query with dynamic criterias?

2007-08-07 Thread Marc Quattrini
Hi Charlie, The problem seems to be with the "OR 1=1" statement. It should read "AND 1=1". It accept always True otherwise and all records have this. Thanks. Marc -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Wednesday, 8 August 2007 11:31 To: CF-Talk Subject

RE: Query with dynamic criterias?

2007-08-07 Thread Marc Quattrini
Hi Charlie, Thanks for the help. Coldfusion doesn't complain, but I have all the result coming up, not just the ones from my criterias. I should have a total of 4 results and I have the entire 22 records coming up. When I do a filter directly in SQL with the criterias, I have only 4 coming up, wh

Query with dynamic criterias?

2007-08-07 Thread Marc Quattrini
Hi, I have the following problem that I can't solve: A customer can view deliveries from/to multiple companies. I have set up the system to get all the companies this customer is allowed to see delivery from/to. SELECT Supplier FROM calmweb_CustFinal