This is a discussion on Error In SQL String... I'm Stumped within the MySQL Database forums, part of the Database Forums category; Hi All, I have only a limited understanding of SQL, so I have tried to determine the cause of this ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi All,
I have only a limited understanding of SQL, so I have tried to determine the cause of this problem, but I have been unable to do so as yet. The following SQL Query: "SELECT *,MATCH(`title`,`extRefNumber`,`content`,`code`,`u ser`,`type`) AGAINST ('+Chaz' IN BOOLEAN MODE) AS score FROM `switchService` WHERE (MATCH(`title`,`extRefNumber`,`content`,`code`,`us er`,`type`) AGAINST ('+Chaz' IN BOOLEAN MODE)) AND ( `updateDateTime` >= '2006/10/20 00:00:00' AND `updateDateTime` <= '2006/10/27 23:59:59') ORDER BY `score` DESC" Returns a MySQL Error: #1064 - You have an error in your SQL syntax near 'BOOLEAN MODE ) AS score FROM `switchService` WHERE ( MATCH ( `title` , `extRefNu' at line 1 Can anyone shed some light on what I am doing wrong? (I promise that I will try and only make this mistake once.) Luke |
|
|||
|
lucanos@gmail.com wrote: > Hi All, > > I have only a limited understanding of SQL, so I have tried to > determine the cause of this problem, but I have been unable to do so as > yet. > > The following SQL Query: > "SELECT *,MATCH(`title`,`extRefNumber`,`content`,`code`,`u ser`,`type`) > AGAINST ('+Chaz' IN BOOLEAN MODE) AS score FROM `switchService` WHERE > (MATCH(`title`,`extRefNumber`,`content`,`code`,`us er`,`type`) AGAINST > ('+Chaz' IN BOOLEAN MODE)) AND ( `updateDateTime` >= '2006/10/20 > 00:00:00' AND `updateDateTime` <= '2006/10/27 23:59:59') ORDER BY > `score` DESC" > > Returns a MySQL Error: > #1064 - You have an error in your SQL syntax near 'BOOLEAN MODE ) AS > score FROM `switchService` WHERE ( MATCH ( `title` , `extRefNu' at line > 1 > > Can anyone shed some light on what I am doing wrong? > (I promise that I will try and only make this mistake once.) > > Luke Hi Luke, What happens when you execute just: SELECT *, MATCH (`title`,`extRefNumber`,`content`,`code`,`user`,`t ype`) AGAINST ('+Chaz' IN BOOLEAN MODE) FROM `switchService`; on its own? |