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 FROMpa

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' AND ( headline LIKE or content LIKE OR ) AND ( headline LIKE

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 SELECT id_page, headline, content, section FROM pages WHERE section <> 'news' AND (

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

2011-05-04 Thread Les Mizzell
This did the trick: WHERE section <> 'news' AND ( headline LIKE or content LIKE OR ) AND ( headline LIKE or content LIKE ) ~| Order t

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 L

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 gen

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 conten

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 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 list is getting

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 o