Little help with a query please...

2011-05-04 Thread Les Mizzell
Below is for a search interface I'm working on. A single word into the query works fine. I've a function that cleans the input, removes common words, and builds a list. The list is getting built properly. If I input bob,ted I get an vague syntax error (shared hosting - robut reporting is

Re: Little help with a query please...

2011-05-04 Thread Greg Morphis
the double quotes? like '%bob%' or '%ted%' On Wed, May 4, 2011 at 7:04 PM, Les Mizzell lesm...@bellsouth.net wrote: Below is for a search interface I'm working on. A single word into the query works fine. I've a function that cleans the input, removes common words, and builds a list. The

Re: Little help with a query please...

2011-05-04 Thread Les Mizzell
On 5/4/2011 8:15 PM, Greg Morphis wrote: the double quotes? like '%bob%' or '%ted%' That's just in the outputted version. I've rewritten it again though. Output is now: WHERE section 'news' AND ( headline LIKE '%barnett%' OR content LIKE '%barnett%' OR headline LIKE '%shale%' OR content

Re: Little help with a query please...

2011-05-04 Thread Greg Morphis
Take your query and wrap it in a cfoutput tag instead of cfquery. Remove the cfqueryparams and just have the variables. This should output exactly what is being passed to your DB. Can you post this query or maybe you'd even see what's wrong. Plus if you run that query against your DB it should

Re: Little help with a query please...

2011-05-04 Thread Les Mizzell
On 5/4/2011 9:11 PM, Greg Morphis wrote: Take your query and wrap it in a cfoutput tag instead of cfquery. Remove the cfqueryparams and just have the variables. That's this: WHERE section 'news' AND ( headline LIKE '%bob%' or content LIKE '%bob%' OR headline LIKE '%robert%' or content LIKE

Re: Little help with a query please ... FIXED

2011-05-04 Thread Les Mizzell
This did the trick: WHERE section 'news' cfif ListLen('#myLIST#') gt 1 AND ( cfloop list=#mylist# index=i cfset #thisROW# = #thisROW# + 1 / headline LIKE cfqueryparam value=%#i#% cfsqltype=cf_sql_varchar or content LIKE cfqueryparam value=%#i#%

Re: Little help with a query please...

2011-05-04 Thread Greg Morphis
Do you not have access to a SQL editor you could put that outputted SQL into? Should point out where the syntax issue is.. Do this cfoutput SELECT id_page, headline, content, section FROM pages WHERE section 'news' cfif ListLen('#myLIST#') gt 1 AND (

Re: Little help with a query please ... FIXED

2011-05-04 Thread Greg Morphis
I know it's late and all but what did you do differently? Here's what you had earlier and looks the same.. lol Like I said.. it's late! WHERE section 'news' cfif ListLen('#myLIST#') gt 1 AND ( cfloop list=#mylist# index=i cfset #thisROW# = #thisROW# + 1 /

Re: Little help with a query please...

2011-05-04 Thread Steve Bryant
Les, That looks good. Did you try running that directly in your database? While I was looking at your query, I thought I would toss out how I would have written it, which removes an extra conditional and an extra variable: SELECT id_page,headline,content,section FROM

A little help with aggregate query, please?

2001-02-21 Thread Chris Montgomery
Howdy, I have an aggregate query that's kicking my butt. Its purpose is to retrieve a simple report of donations by donors within a given date range. Most everything works except for the Count and Sum functions. I'm not sure this can be done in one query or not. Database is MS Access. What I'm

RE: A little help with aggregate query, please?

2001-02-21 Thread Christopher Olive, CIO
les to display at your leisure. chris olive, cio cresco technologies [EMAIL PROTECTED] http://www.crescotech.com -Original Message- From: Chris Montgomery [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 5:53 PM To: CF-Talk Subject: A little help with aggregate query, please?

RE: A little help with aggregate query, please?

2001-02-21 Thread Chris Montgomery
-4692 AIM: astutiaweb; ICQ: 7381282; Firetalk: Ag78 -Original Message- From: Christopher Olive, CIO [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 5:18 PM To: CF-Talk Subject: RE: A little help with aggregate query, please? your sum is being GROUPed by each individual