PDA

View Full Version : [fixed] Bug in Advanced Member Search?


Grover
Thu 26th Sep '02, 11:02am
Hi,

I just wanted to find out which users did have just 1 posting. So I went to the advanced membersearch in the memberlist and put the following in the fields:

and Number of Posts is greater than : 0
and Number of Posts is less than : 2

VB then generates a list of not only all users with just 1 posting, but ALSO it contains all the users with 0 postings!

I just want to have a list of people who posted ONCE. I guess it can only be done the way I did it, but it doesn't work

Scott MacVicar
Thu 26th Sep '02, 10:31pm
yep, the intval of the variable makes sure its 0

and the

if ($postslower!="") {

will return false as thats what 0 is considered.

Too tired to look into it much more i think i'll move it to bugs forum and then bed.

Grover
Fri 27th Sep '02, 4:51am
... for looking at it.

John
Fri 27th Sep '02, 5:39am
Thanks Christian Stadler for this fix...

FIND

$postslower=intval($postslower);
if ($postslower!="") {
$condition.=" AND posts>'$postslower'";
}
$postsupper=intval($postsupper);
if ($postsupper!="") {
$condition.=" AND posts<'$postsupper'";
}

REPLACE WITH

if ($postslower!="") {
$condition.=" AND posts>".intval($postslower);
}
if ($postsupper!="") {
$condition.=" AND posts<".intval($postsupper);
}

[Don't need quotes :) -Chen]