Jump to content

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

Link to comment
https://forums.phpfreaks.com/topic/2585-boolean-mode-in-mssql/
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 ))

Link to comment
https://forums.phpfreaks.com/topic/2585-boolean-mode-in-mssql/#findComment-8621
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.