I have table like this:
Expand|Select|Wrap|Line Numbers
- select * from sampletest;
- | title | description |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | AWK was probably second after Snobol a string processing language that extensively use regular expressions. | In 1985, just before Perl, a new version made the programming language more powerful, introducing user-defined functions, multiple input streams, and computed regular expressions. The version in System V Release 4 added some new features and also cleaned up the behavior in some of the ``dark corners' of the language. |
- | WWW has dramatically raised the visibility of Perl in recent years -- to certain extent at the expense of TCL and other Unix-based scripting languages, although WEB also produced several Perl competitors like JavaScript and PHP | Due to the Web Perl has become one of major programming languages for Internet practically like VB dominates Windows arena, Perl now dominates CGI scripts |
- +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- 2 rows in set (0.00 sec)
query1= regular AND expressions
query2=regular AND (expressions OR AWK)
I want to match ( title and description both) with these query terms and retrieve the matched title and descriptions.
I have created fulltext on title and description.
I am not getting how to form a select query which satisfies the above criteria!!!
Output should be like this:
Expand|Select|Wrap|Line Numbers
- AWK was probably second after Snobol a string processing language that extensively use regular expressions [ in title]
- In 1985, just before Perl, a new version made the programming language more powerful, introducing user-defined functions, multiple input streams, and computed regular expressions. The version in System V Release 4 added some new features and also cleaned up the behavior in some of the ``dark corners' of the language [in description]
I tried like this for title only but i don't know how to combine both title and description.
Expand|Select|Wrap|Line Numbers
- select title from sampletest where title RLIKE '[[:<:]]regular[[:>:]]' and title RLIKE '[[:<:]]expression[[:>:]]' :]]';
- +-------------------------------------------------------------------------------------------------------------+
- | title |
- +-------------------------------------------------------------------------------------------------------------+
- | AWK was probably second after Snobol a string processing language that extensively use regular expressions. |
- +-------------------------------------------------------------------------------------------------------------+
- 1 row in set (0.01 sec)
How can i do this?
Regads
Archana