vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Member of the Day! (https://vborg.vbsupport.ru/showthread.php?t=34779)

cditty 03-04-2002 02:34 PM

I don't know. It's weird. I figured it musta had something to do with the customized sql that you had to give me. Every time I tried it, I got an invalid sql command.

I also just sent you a pm....

Chris

neal 03-04-2002 02:35 PM

I have done so, and I still get the error

ForKmaN 03-05-2002 02:25 PM

works for me now :)

cditty 03-07-2002 01:42 AM

Any ideas on mine FireFly?

Chris

Admin 03-07-2002 08:55 AM

What's the error you are gettting, Chris?

cditty 03-07-2002 10:50 AM

This is the error that I am getting.

[code]
Database error in vBulletin 2.2.1:

Invalid SQL: -1209600
AND (usergroupid=5
OR usergroupid=6
OR usergroupid=7
OR usergroupid=9
OR usergroupid=10
OR usergroupid=2)
ORDER BY randNum
LIMIT 1
mysql error:

mysql error number:

Date: Thursday 07th of March 2002 06:46:03 AM
[\code]

This is the code as I have it in my index.php3 file.
Code:

$newmember=$DB_site->query_first("SELECT userid,username,userid*0+RAND() AS randNum
                                        FROM user
                                      WHERE userid<>$daybits[1] AND posts>99
                                        AND lastactivity>time()-(86400*14)
                                        AND (usergroupid=5
                                          OR usergroupid=6
                                          OR usergroupid=7
                                          OR usergroupid=9
                                          OR usergroupid=10
                                          OR usergroupid=2)
                                      ORDER BY randNum
                                      LIMIT 1");

I have tried it with and without the "s around the time() section. Wierd thing is that I can run this query though mysqladmin.

Chris

cditty 03-07-2002 10:59 AM

I just got it going. I simply replaced the "s with 's. Seems to work like a charm.

Thanks again.

Chris

Dakota 03-12-2002 03:31 PM

Thanks, my members love this hack, just need to change it so that the use must still be active on the forum.

Dakota 03-13-2002 10:07 PM

Quote:

Originally posted by FireFly
Replace:
Code:

                                      WHERE userid<>$daybits[1]
with:
Code:

                                      WHERE userid<>$daybits[1] AND lastactivity>".time()-(86400*14)."
(14 is the number of days)

By the way, I'm not sure myself whether it's lastactivity or lastvisit we need to check, so I'm open for corrections here. :)

when I changed it to go by the activity, it gave me an error. I don't know why, I copied everything correctly.

cditty 03-13-2002 10:54 PM

try using single quotes instead of double. That was my problem.

Chris


All times are GMT. The time now is 01:50 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01433 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete