FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » PHP discussions » help
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: help [message #5520 is a reply to message #5519] Fri, 06 September 2002 01:27 Go to previous messageGo to previous message
ezdb is currently offline  ezdb   China
Messages: 158
Registered: May 2002
Location: china
Karma:
Senior Member

my function is out

function sp_str($str){
$str = trim(preg_replace('/\"|\'|\;|\\\\|\s+/', '', $str));
$len=strlen($str);
for($i=0;$i<$len;$i++){
if (ord($str[$i]) > 128){
$arr[]=$str[$i].$str[$i+1];
$i++;
}else{
$arr[]=$str[$i];
}
}
return $arr;
}

i want to search a way to let fud support chinese search ,and not use '%' in sql

it isn't work as my thought now
eg:
keyword is "ab cd"
if user selected 'and'
then
word='a' and word='b' and word='c' and word='d'
if selected or
then
word='a' or word='b' or word='c' or word='d'(it is bad!)
===============
(word='a' and word='b') or (word='c' and word='d')
if like this ,it would be work well



  • Attachment: isearch.inc.t
    (Size: 12.49KB, Downloaded 1331 times)
[Message index]
 
Read Message icon12.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: the ? operator
Next Topic: OOP php
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 16:55:48 GMT 2024

Total time taken to generate the page: 0.04604 seconds