Jump to content

Archived

This topic is now archived and is closed to further replies.

lizrickaby

Boolean Mode in MSSQL?

Recommended Posts

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";

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.