This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » General discussion » Search bar question
Search bar question [message #61674] Tue, 23 September 2008 23:28 Go to next message
Russpd  is currently offline Russpd
Messages: 104
Registered: September 2008
Senior Member
I am using the askeet tutorial to create a search engine of my own. When I try to submit the query, I keep getting an error saying:

Could not execute query [Native Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(reveww_search_index.WORD = 'dfa') GROUP BY reveww_search_index.RATING_ID ' at line 3] [User Info: SELECT DISTINCT reveww_search_index.RATING_ID, COUNT(*) AS nb, SUM(reveww_search_index.WEIGHT) AS total_weight FROM reveww_search_index (reveww_search_index.WORD = 'dfa') GROUP BY reveww_search_index.RATING_ID ORDER BY nb DESC, total_weight DESC LIMIT 10]

This has to do with the middle of the code in my Rating model that I uploaded. I followed the askeet tutorial but altered/removed pieces that are not relevant to the app I am building. If you compare the code that I have to the one in the askeet tutorial you will see the only big change is that that I am commenting out if clauses regarding permanent tags and tags in general (since i don't use them). To be honest, I am an intermediate coder and don't undersatnd everything in the Askeet tutorial regarding SQL queries and wonder whether making that change would lead to this type of error being generated. I scanned the code multiple times and can't understand how it would.

Thanks for the help. The responses on this forum have been simply amazing and I am really grateful.

Re: Search bar question [message #61678 is a reply to message #61674 ] Tue, 23 September 2008 23:50 Go to previous message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Presumably "reveww_search_index.WORD = 'dfa'" is a WHERE clause, but you have no WHERE statement.


Remember Palestine
Previous Topic:Smarty view
Next Topic:propel criteria
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software