Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 27 Jan 2017, 22:57
MrFurious MrFurious is offline
 
Join Date: Sep 2010
Looking for a Drawing/Raffle Mod

I'm looking for a vb4 mod to pick random users from my database for product give-aways. I need to be able to specify what usergroup(s) are eligible for the drawing, and only select from those who have been active on the forum in a given amount of time (1 month, 6 months, 1 year, etc.)

I'm a business guy, not a programmer - so a simple plugin or mod would be best. I am savvy enough to run a SQL query via Maintenance if if I have a query I can just C&P.

Never imagined it would be this much of a headache to give something away. lol
Reply With Quote
  #2  
Old 28 Jan 2017, 04:23
scottkoz20 scottkoz20 is offline
 
Join Date: Jan 2016
Real name: Scott
this might be useful for you

http://www.vbulletin.org/forum/showt...ghlight=raffle
Reply With Quote
  #3  
Old 28 Jan 2017, 04:43
MrFurious MrFurious is offline
 
Join Date: Sep 2010
I'm not looking for something that extensive or elaborate, I just want a simple "click the button and get a name" or "paste a query and get a result" for the oddball drawing I do now and then to give something away.
Reply With Quote
  #4  
Old 28 Jan 2017, 05:35
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Suppose you wanted to pick a user at random from usergroups 6 and 9, then you could use this query:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The limit of 1 will be ignored, so either just take the first name shown, or set "Results to Show Per Page" at 1.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #5  
Old 28 Jan 2017, 08:57
MrFurious MrFurious is offline
 
Join Date: Sep 2010
If I use this query:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I get this error:

An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FIND_IN_SET(104,membergroupids) OR FIND_IN_SET(105,membergroupids) OR FIND_IN_SE' at line 1

Using this shortened version:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I get the following error:

An error occurred while attempting to execute your query. The following information was returned.
error number: 1146
error desc: Table 'savagesh_vBull_CMS_Prod.user' doesn't exist
Like I said, I'm not a programmer. MySQL version is 5.5.52-cll if that matters any.
Reply With Quote
  #6  
Old 28 Jan 2017, 09:14
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
In the first query, you have an "OR" that's misplaced. In the second, I am guessing you need to specify a table prefix before "user AS user".
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #7  
Old 28 Jan 2017, 12:12
TheAdminMarket's Avatar
TheAdminMarket TheAdminMarket is offline
 
Join Date: Jun 2013
Real name: Christos Teriakis

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 09:33.

Layout Options | Width: Wide Color: