SQL Error when Lottery picks a winner [SOLVED]

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   SQL Error when Lottery picks a winner [SOLVED]
gadford
CZ Active Member
 Codezwiz Site Donator
gadford has been a member for over 20 year's 20 Year Member
usa.gif arkansas.gif
Occupation: Wachter Network Services
Age: 48
Gender: Male
Fav. Sports Team: Da Bearz
Website:
Status: Offline
Joined: Jun 15, 2004
0.01 posts per day
Posts: 109
Points: 27
  MSN Messenger 
I have the Lottery add on installed. It was working okay until it actually went to pick a winner, so to speak.

I could purchase tickets ok, but got the following error message when I go to the Lottery link:

Error getting information from users table!

DEBUG MODE

SQL Error : 1054 Unknown column 'user_items' in 'field list'

SELECT `username`, `user_items` FROM nuke_users WHERE user_id='2'

Line : 184
File : /home/virtual/site48/fst/var/www/html/modules/Forums/lottery.php



Line 184 of lottery.php reads:

         message_die(GENERAL_ERROR, sprintf($lang['lottery_error_selecting'], 'users'), '', __LINE__, __FILE__, $sql);



The line of code it is referencing deals with getting the current winners name and items if that helps. (I tried taking out user_items of the lottery.php file but it just hosed it worse so I put it back. I don't have user_items anywhere in my sql)

Help is appreciated! TIA



_________________
Back to top Reply with quote
#2   re: SQL Error when Lottery picks a winner
gadford
CZ Active Member
 Codezwiz Site Donator
gadford has been a member for over 20 year's 20 Year Member
usa.gif arkansas.gif
Occupation: Wachter Network Services
Age: 48
Gender: Male
Fav. Sports Team: Da Bearz
Website:
Status: Offline
Joined: Jun 15, 2004
0.01 posts per day
Posts: 109
Points: 27
  MSN Messenger 
I changed the option for the lottery to Auto-restart and everything is working.




_________________
Back to top Reply with quote
#3   re: SQL Error when Lottery picks a winner [SOLVED]
cfMatriX
CZ Newbie
cfMatriX has been a member for over 20 year's 20 Year Member
usa.gif nevada.gif
Gender: Male
Website:
Status: Offline
Joined: Dec 12, 2004
0.00 posts per day
Posts: 23
Points: 1,731
 Yahoo Messenger  
I've always had the Auto-Restart option on but I can't get past this error when it's time to draw a winner:


General Error

Error getting information from users table!

DEBUG MODE

SQL Error : 1054 Unknown column 'user_items' in 'field list'

SELECT `username`, `user_items` FROM nuke_users WHERE user_id='17'

Line : 184
File : /home/virtual/site155/fst/var/www/html/modules/Forums/lottery.php

Anybody know how to fix this yet?
There's a few others asking the same question over at phpbbhacks but no fixes as of yet.



Back to top Reply with quote
#4   re: SQL Error when Lottery picks a winner [SOLVED]
Dauthus
CZ Addict
 Codezwiz Site Donator
Dauthus has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 61
Gender: Male
Website:
Status: Offline
Joined: Mar 17, 2004
0.06 posts per day
Posts: 426
Points: 15,917
   
The user_items field is added to the nuke_user table when you install the shop mod. I didn't notice the correlation, but you may have to have the shop mod installed before you run the lottery mod.

Both of these mods were made by zarath, and I would bet that could be your problem. Try adding the shop mod and see if that works.

I think the way the lottery was set up was so an individual could win items from the shop in the lottery, not just points.

Here is a portion of the sql from the shop mod install that adds this:

$sql[] = "alter table " . USERS_TABLE . " add `user_items` TEXT";




_________________
[ Register or login to view links on this board.]
Vivere disce, cogita mori
Back to top Reply with quote
#5   re: SQL Error when Lottery picks a winner [SOLVED]
cfMatriX
CZ Newbie
cfMatriX has been a member for over 20 year's 20 Year Member
usa.gif nevada.gif
Gender: Male
Website:
Status: Offline
Joined: Dec 12, 2004
0.00 posts per day
Posts: 23
Points: 1,731
 Yahoo Messenger  
I'll give it a shot ~ thanks



Back to top Reply with quote
#6   re: SQL Error when Lottery picks a winner [SOLVED]
cfMatriX
CZ Newbie
cfMatriX has been a member for over 20 year's 20 Year Member
usa.gif nevada.gif
Gender: Male
Website:
Status: Offline
Joined: Dec 12, 2004
0.00 posts per day
Posts: 23
Points: 1,731
 Yahoo Messenger  
That worked icon_smile.gif

I uploaded the shop files and ran the sql but didn't edit any of the files to finish up the full shop install.

I turned the Lottery back on and set the time limit to 120 seconds to see if the draw would work and YES it did.

Thanks Dauthus



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum