[jdev] re: help for jabberd2, using 'like' in filter
yang yang
eagleababa at yahoo.com.cn
Fri Mar 25 01:25:54 CST 2005
hi all,
> Hi,
> I have reviewed the source code for jabberd2 . And I want
to query the mysql database by “like”, but it seems that the
source code doesn’t support that .
> For example , I want to build a sql command like this :
> Select * from private where `collection-owner` = `xxx` AND `ns`
like `storage:xxx` ;
> I found that the string-parse function
“_st_mysql_convert_filter( )” only parse the string like “ns = xxx” .So who can tell me how
to query the mysql by “like”.
> And how can I deal with command like this:
> Select * from private where `collection-owner` = `xxx` AND `ns`
like `storage:xxx` AND `xml` like `xxxx`;
>This really belongs on the jabberd list
(http://mail.jabber.org/mailman/listinfo/jabberd/, or subscribe through
gmane).
>'like' isn't an operator supported by the filter code, but it's also
SQL-specific (and probably different according to SQL version), so one
would need a mechanism to generalise this to other types of storage
(e.g. bdb).
>What are you trying to do with the like operator ?
Thank Stephen for a lot! I use 'like' for imprecise substring searching from database; such as string 'eagle' !='eag' but 'eagle' like '%eag%'.
As you say,I'd like to send my proplem mail to jabberd mail list!
best regards
---------------------------------
Do You Yahoo!?
注册世界一流品质的雅虎免费电邮
More information about the JDev
mailing list