> If I have records like this > ID Content > 1 "John have a red book, and a yellow book. He give a yellow book to Tina". > 2 "Luke doesn't have any book at all, he always borrow it from John". > 3 "John like swimming". > > Can I search this records (table) for a word "book" and also number of "book" > occurences at every record? > > From table above, the result would be > ID Number > 1 3 > 2 1 > I use Oracle 8.1.7.
I'm not an Oracle expert - you may be able to do the whole thing in SQL - but as a first approximation: SELECT ID, Content FROM MyTable WHERE Content LIKE '%book%' then for each returned record, echo $id." ".substr_count($content, "book"); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php