|
Comments for: dhar20040217
| Message # 1019032: |
|
Date: 02/23/04 19:31
By: Pablo Almunia Subject: More easy with MySQL FullText This is a alternative way: === TABLE === CREATE TABLE `pages` ( `id` int(11) NOT NULL auto_increment, `url` varchar(100) NOT NULL default '', `text` mediumtext NOT NULL, PRIMARY KEY (`id`), FULLTEXT KEY `text` (`text`) ) TYPE=MyISAM; === INDEX HTML FILE ==== $cText = strip_tags( file_get_contents($cURL) ); mysql_query("INSERT INTO pages ( url, text ) VALUES ( '". $cUrl ."', '". $cText ."') === QUERY === mysql_query( "SELECT url, SUBSTRING( TRIM( text ), 1, 200 ) as abstract FROM pages WHERE MATCH(text) AGAINST ('" . $cQuery . "')" ); This is a very easy FullText of HTML file with PHP. |
Previous Message | Next Message |
| Comments: | ||
| Ä«/µå/µ¹·Á¸·±â·Î/¸Á°¡Áö½ÅºÐ/²À º¸¼¼¿ä! | ÀÌÇýÁø | 12/05/04 00:00 |
| Ä«,µå,¿¬,ü,ÀÚ/¿¹.Á¤.ÀÚ ´ë,Ãâ 100-1000¸¸¿ø | ÀÌ´ÙÇö | 12/03/04 00:16 |
| ½Å.¿ë.ºÒ.·®/Ä«.µå.¿¬.ü/´ë.Ãâ/È¥ÀÚ/ÇØ.°áÇÏ´Â/¹æ.¹ý | ±èÇö¼ | 12/02/04 20:22 |
| ´ë'Ãâ'°Å'Àý'½Ã'100%µÇ'°Ô'ÇÏ'´Â'¹æ'¹ý | ÇѰæ¿í | 11/29/04 11:58 |
| ½Å.¿ë.ºÒ.·®.ÀÚ/´çÀÏ500/´ë.Ãâ.ºñ.¹ý | ÀÌÈñÁø | 11/21/04 20:40 |
| ½Å.¿ëºÒ.·®ÀÚ°¡ ¾Ë¾Æ¾ßÇÒ Á¤.º¸ ´ë.°ø.°³ | ÀÌ´ÙÁø | 11/20/04 07:13 |
| ½Å.¿ë.ºÒ.·®.ÀÚ/´çÀÏ500/´ë.Ãâ.ºñ.¹ý | ÀÌÈñÁø | 11/20/04 05:54 |
| We already have | Andrew Rodland | 03/23/04 15:23 |
| RE: More easy with MySQL FullText | Armand Turpel | 02/26/04 03:39 |
| More easy with MySQL FullText | Pablo Almunia | 02/23/04 19:31 |
| Keytable with fixed rows length | Armand Turpel | 02/18/04 04:40 |
|
If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly. | ||


