Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Inactive Users
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

hollowman
Starting Member

Denmark
38 Posts

Posted - 16 February 2004 :  11:21:08  Show Profile  Visit hollowman's Homepage
Hi
Problem whit Inactive Users
i have a member that havent been activ for 24 days
but when i wright lets say 20 days and submit he doesent
pop up why??
i have to wright 5 days then him and another user pops up
why do ther have to be 2 members in the list before hi pops up??
plzz help

Hollowman.

NorwegianViking
Junior Member

Denmark
119 Posts

Posted - 16 February 2004 :  11:35:37  Show Profile  Visit NorwegianViking's Homepage
Yep, you are right.
Same thing at my site.
Must be a bug....

kind regards
NorwegianViking

Mod installation for beginners | User registration problems?
Go to Top of Page

NorwegianViking
Junior Member

Denmark
119 Posts

Posted - 16 February 2004 :  11:58:48  Show Profile  Visit NorwegianViking's Homepage
I have so far looked at this in Admin_inactive_users.asp
- the date used in the query based on the input field
- the SQL statement
- the check for if any records is selected

The two first is fine, the latter is wrong.
Running the Query in Access returns the right number of records, even if there only is one in the selection.

The author uses this statement to check if the selection is empty
aDataerr = 0
if ubound(aData, 2) = 0 then
aDataerr = 1
end if

Later aDataerr is used to inform that there is no records.
If there is 0 or 1 records selected, aDataerr is set to 1, later resulting that no records is shown.

I do not know ASP, so this is as far I can help you.

Is there anyone who can tell whats wrong with the above test?

kind regards
NorwegianViking

Mod installation for beginners | User registration problems?
Go to Top of Page

miperez
Junior Member

Spain
243 Posts

Posted - 16 February 2004 :  12:23:36  Show Profile
I know what the problem can be.

Ubound returns the upper bound of the array, that usually starts in 0. So, if the array is empty, it returns 0, and if there is only one element, it also returns 0.

Try making these changes in the code (I haven't got the MOD installed, so I cannot check it myself):

set oRs = server.createobject("ADODB.Recordset")
oRs.open strSql, My_Conn
aDataerr = 0
if oRs.Recordcount = 0 then
   aDataerr = 1
end if	

	aData = oRs.GetRows
	oRs.close
	set oRs = nothing
	'load up our array with all the data from the query and disconnect from the record set. 

	
aDataerr = 0
if ubound(aData, 2) = 0 then
   aDataerr = 1
end if	

Best Regards

Mikel Perez

"Hell is the place where everything test perfectly, and nothing works"
Go to Top of Page

hollowman
Starting Member

Denmark
38 Posts

Posted - 17 February 2004 :  01:16:40  Show Profile  Visit hollowman's Homepage
Hi miperez
Nice it works thanks but its the 17th today i tryed to insert 1 day
and i see all but one he was on yesterday the 16th but its ok
i can live with that so ones again thanks

Hollowman.
Go to Top of Page

miperez
Junior Member

Spain
243 Posts

Posted - 17 February 2004 :  03:56:46  Show Profile
Hi, hollowman, I'm glad it worked.

The problem with that record is that this MOD doesn't only check for days, but it also considers the time of the day, down to the level of seconds.

That is, if you ask on February 17th at 9:50 for users that have not been active for 1 day, it won't show a user that posted something on February 16th at 22:48, for instance, as he in fact sent something less than 24 hours before.

Best Regards

Mikel Perez

"Hell is the place where everything test perfectly, and nothing works"
Go to Top of Page

NorwegianViking
Junior Member

Denmark
119 Posts

Posted - 17 February 2004 :  04:11:44  Show Profile  Visit NorwegianViking's Homepage
Thanks miperez

kind regards
NorwegianViking

Mod installation for beginners | User registration problems?
Go to Top of Page

hollowman
Starting Member

Denmark
38 Posts

Posted - 18 February 2004 :  05:50:19  Show Profile  Visit hollowman's Homepage
Ahh ok Thanks again miperez

Hollowman.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07