From: <jj...@us...> - 2004-02-10 02:56:50
|
Update of /cvsroot/ngetsuite/ngetsuite/ngetsuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28219/ngetsuite Modified Files: group.rb Log Message: changed the search ability to regexp in the subjects in the database (mysql's RLIKE) Index: group.rb =================================================================== RCS file: /cvsroot/ngetsuite/ngetsuite/ngetsuite/group.rb,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** group.rb 8 Feb 2004 12:55:48 -0000 1.34 --- group.rb 9 Feb 2004 15:32:58 -0000 1.35 *************** *** 128,132 **** def search(filter) ! sth = Db.dbh.execute('select * from `articles` where `group` = ? and `subject` LIKE ? order by `time` desc', @_fullname, '%'+filter+'%') sth.fetch_hash do |row| puts row['subject'] --- 128,132 ---- def search(filter) ! sth = Db.dbh.execute('select * from `articles` where `group` = ? and `subject` RLIKE ? order by `time` desc', @_fullname, filter) sth.fetch_hash do |row| puts row['subject'] |