Error In SQL String... I'm Stumped

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 ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-27-2006
lucanos@gmail.com
 
Posts: n/a
Default Error In SQL String... I'm Stumped

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

Reply With Quote
  #2 (permalink)  
Old 10-30-2006
Daz
 
Posts: n/a
Default Re: Error In SQL String... I'm Stumped


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?

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:16 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0