Jump to content


Photo

Boolean Mode in MSSQL?


  • Please log in to reply
1 reply to this topic

#1 lizrickaby

lizrickaby
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 29 September 2005 - 08:06 PM

I have to move a PHP knowledge base from a MySQL database over to a MSSQL database. I've got just about everything figured out, except for the search script. It seems to be a problem with the "IN BOOLEAN MODE" part of the script. Is MSSQL capable of boolean? Is there a different syntax for it? Here's the full line of code ("body" is the field to be searched)...

$query="SELECT * FROM internalKB WHERE body LIKE ('$keyword' IN BOOLEAN MODE) order by title ASC";

#2 lizrickaby

lizrickaby
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 04 October 2005 - 12:27 AM

I think what I need to do is have the field I want to search set up as a full text key. Is there a way to do that after the table has already been created, or do I have to start all over? And what is the correct syntax for that? I found a few bits of code online that say how to make a full text key, but I can't get it to work (below)...

CREATE TABLE inhouselKB (id int NOT NULL identity, title VARCHAR( 255 ), body TEXT, datnum TIMESTAMP, inputby VARCHAR( 100 ), category VARCHAR( 50 ), PRIMARY KEY ( id ), FULLTEXT KEY ( title, body ))




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users