If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > You have an error in your SQL syntax

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-28-10, 03:22
remshad remshad is offline
Registered User
 
Join Date: Jun 2010
Posts: 3
You have an error in your SQL syntax

can anybody please dubug the error in this script


Code:
SQL Error: 1064 - 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 ''Technology\' IN BOOLEAN MODE)
                                                       LIMIT 1' at line 6
Query: SELECT `mybb_threads`.fid, `mybb_threads`.tid, `mybb_threads`.tag, `mybb_threads`.subject,
                                                       `mybb_forumpermissions`.canview
                                                       FROM
                                                       `mybb_threads` LEFT JOIN `mybb_forumpermissions` ON `mybb_forumpermissions`.canview = 0
                                                       WHERE
                                                       MATCH (`mybb_threads`.subject) AGAINST ('Technology\' IN BOOLEAN MODE)
                                                       LIMIT 1
please i want to debug script error ...
Reply With Quote
  #2 (permalink)  
Old 09-28-10, 04:05
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
try removing the escape character \ in Technology\'
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old 09-28-10, 21:47
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
I'd guess your error is here:
FROM
Code:
`mybb_threads` 
LEFT JOIN 
`mybb_forumpermissions` 
ON `mybb_forumpermissions`.canview = 0
you haven't specified which column in mybb_threads is being joined.
Reply With Quote
  #4 (permalink)  
Old 09-29-10, 15:50
sqlfan sqlfan is offline
Registered User
 
Join Date: Jul 2010
Posts: 7
If you need 'Technology\' in your query string, use 'Technology\\' instead.

check this site for more SQL programming information:
Learn SQL
Reply With Quote
  #5 (permalink)  
Old 09-29-10, 15:58
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
Quote:
Originally Posted by sqlfan View Post
check this site ...
is that your web site?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On