Loading ...
Sorry, an error occurred while loading the content.

Boolean Text Search

Expand Messages
  • Kaushlesh
    Hi everybody, I am having problem in searching a String in the mySQL table. Example : If I type How are you in a field if this String exist in either of the
    Message 1 of 1 , Apr 30, 2006
    • 0 Attachment
      Hi everybody,

      I am having problem in searching a String in the mySQL table.

      Example : If I type "How are you"

      in a field if this String exist in either of the two fields having
      values like :

      #
      # Table structure for table `tbl_questions`
      #

      CREATE TABLE `tbl_questions` (
      `fldQid` int(10) unsigned NOT NULL auto_increment,
      `fldQuestion` varchar(200) default NULL,
      `fldKeywords` text,
      PRIMARY KEY (`fldQid`),
      FULLTEXT KEY `fldQuestion` (`fldQuestion`,`fldKeywords`)
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

      #
      # Dumping data for table `tbl_questions`
      #

      INSERT INTO `tbl_questions` VALUES (1, 'What is your
      name', 'Charlie;Sandy;Christina');
      INSERT INTO `tbl_questions` VALUES (2, 'Hello How are you', 'Hello
      Doing Health');
      INSERT INTO `tbl_questions` VALUES (3, 'looking for', 'chair, table,
      mousepad, speakers');


      So the two search fields are fldQuestion and fldKeywords if the
      string single word also exist in any of these two fields then it
      should returns me the total number of existance found in both the
      fields seperatly.

      If anyone did not understand the question properly. you may ping me
      on my Yahoo ID: kaushlesh_singh

      Thanks
      Kaushlesh Singh
    Your message has been successfully submitted and would be delivered to recipients shortly.