Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
0 + 4 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     
add(new Criteria('user_bio', '%'.$myts->addSlashes(trim($HTTP_POST_VARS['user_bio'])).'%', 'LIKE')); }[/quote] Result: None user will be found! What am I doing wrong? :-? Thanks Skywalk[/quote]" />

Re: Searching 'Extra Info' in Xoopsmembers Module
by Anonymous on 2004/2/10 19:21:20

A few minutes later: The solution

Quote:
if ( !empty($HTTP_POST_VARS['user_bio']) ) {
$match = (!empty($HTTP_POST_VARS['user_bio_match'])) ? intval($HTTP_POST_VARS['user_bio_match']) : XOOPS_MATCH_CONTAIN;
switch ($match) {
case XOOPS_MATCH_START:
$criteria->add(new Criteria('bio', $myts->addSlashes(trim($HTTP_POST_VARS['user_bio'])).'%', 'LIKE'));
break;
case XOOPS_MATCH_END:
$criteria->add(new Criteria('bio', '%'.$myts->addSlashes(trim($HTTP_POST_VARS['user_bio'])).'%', 'LIKE'));
break;
case XOOPS_MATCH_EQUAL:
$criteria->add(new Criteria('bio', $myts->addSlashes(trim($HTTP_POST_VARS['user_bio']))));
break;
case XOOPS_MATCH_CONTAIN:
$criteria->add(new Criteria('bio', '%'.$myts->addSlashes(trim($HTTP_POST_VARS['user_bio'])).'%', 'LIKE'));
break;
}
}


to whom it may concern ...
Skywalk
Searching 'Extra Info' in Xoopsmembers Module
by Anonymous on 2004/2/10 17:35:47

It must be easy, or not?

First: I uncomment the lines with "bio" in index.php (xoopsmembers).

Result: Every user will be found!

Second: I add:
Quote:
if ( !empty($HTTP_POST_VARS['user_bio']) ) {
$criteria->add(new Criteria('user_bio', '%'.$myts->addSlashes(trim($HTTP_POST_VARS['user_bio'])).'%', 'LIKE'));
}

Result: None user will be found!

What am I doing wrong?

Thanks
Skywalk

Who's Online

234 user(s) are online (171 user(s) are browsing Support Forums)


Members: 0


Guests: 234


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits