Ne help with a Lottery Mod SQL Error

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Ne help with a Lottery Mod SQL Error
WeigelRich
CZ Active Member
WeigelRich has been a member for over 18 year's 18 Year Member
usa.gif pennsylvania.gif
Occupation: Safety Specialist
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Jul 06, 2005
0.02 posts per day
Posts: 123
Points: 4,498
 Yahoo Messenger MSN Messenger 
Ok hello all,

I am having a problem with the lottery mod. I have uploaded all the files and did all the edits. I uploaded the sql file. I am running nuke 7.6.0.31 and forums 2.0.17..

Error is
An Error Occurred

DEBUG MODE

SQL Error : 1146 Table 'XXXXXXXXXX.lottery' doesn't exist

SELECT * FROM lottery WHERE id > 0

Line : 119
File : admin_lottery.php


I am really stumpid. I am also using the cash mod. any ideas.

Thanks for the help in advance



_________________
Back to top Reply with quote
#2   re: Ne help with a Lottery Mod SQL Error
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 19 year's 19 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 46
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
Hey there. Here's a little briefing on SQL select statements:

SELECT = go get me....
* = everything...
FROM = from this table:

So that being said, your code:

An Error Occurred

DEBUG MODE

SQL Error : 1146 Table 'XXXXXXXXXX.lottery' doesn't exist

SELECT * FROM lottery WHERE id > 0

Line : 119
File : admin_lottery.php


...may have an issues with your SELECT statement. Their error says that the table titled 'XXXXXXXXXX.lottery' doesn't exist. Is that what the table is really called? Because your SELECT statement is asked for a table called lottery. Perhaps it is called nuke_lottery (just a guess). Check your SQL and see what it should be called. Hope this helps.



_________________
"The pursuit of easy things makes men weak."
-David O. McKay
Back to top Reply with quote
#3   
WeigelRich
CZ Active Member
WeigelRich has been a member for over 18 year's 18 Year Member
usa.gif pennsylvania.gif
Occupation: Safety Specialist
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Jul 06, 2005
0.02 posts per day
Posts: 123
Points: 4,498
 Yahoo Messenger MSN Messenger 
yeah in my database it shows nuke_lottery. but that is not what it comes up when it comes with in the error. So if that is the case then where is it wrong in the files.




_________________
Back to top Reply with quote
#4   re: Ne help with a Lottery Mod SQL Error
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 19 year's 19 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 46
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
I would look for something like

SELECT * FROM lottery WHERE id > 0
around

Line : 119

in the

File : admin_lottery.php



_________________
"The pursuit of easy things makes men weak."
-David O. McKay
Back to top Reply with quote
#5   
WeigelRich
CZ Active Member
WeigelRich has been a member for over 18 year's 18 Year Member
usa.gif pennsylvania.gif
Occupation: Safety Specialist
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Jul 06, 2005
0.02 posts per day
Posts: 123
Points: 4,498
 Yahoo Messenger MSN Messenger 
Ok i found it but what do I edit for it to find the right table.

Here is the code.
   $sql = "SELECT *
      FROM " . LOTTERY_TABLE . "
      WHERE id > 0";
   if ( !($result = $db->sql_query($sql)) )
   {
      message_die(GENERAL_ERROR, sprintf($lang['lottery_error_selecting'], 'lottery'), '', __LINE__, __FILE__, $sql);
   }




_________________
Back to top Reply with quote
#6   re: Ne help with a Lottery Mod SQL Error
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 19 year's 19 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 46
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
Perhaps there is a language file in there that can be edited? Do you have a language file with that mod?




_________________
"The pursuit of easy things makes men weak."
-David O. McKay
Back to top Reply with quote
#7   
WeigelRich
CZ Active Member
WeigelRich has been a member for over 18 year's 18 Year Member
usa.gif pennsylvania.gif
Occupation: Safety Specialist
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Jul 06, 2005
0.02 posts per day
Posts: 123
Points: 4,498
 Yahoo Messenger MSN Messenger 
just lang_admin and lang_main

Doesn't seem that it is going to work. Thanks for the help.




_________________
Back to top Reply with quote
#8   re: Ne help with a Lottery Mod SQL Error
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 19 year's 19 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 46
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
Well, without knowing too much about that module, the easy answer is to change:
" . LOTTERY_TABLE . "

To
nuke_lottery


This isn't best practice because there is probably some type of configuration file that defines what your lottery table is called and there are probably other files that would need to be changed too (not a modular solution). I can almost guarantee that you're going to have that same SQL statement pop up in other files.



_________________
"The pursuit of easy things makes men weak."
-David O. McKay
Back to top Reply with quote
#9   
WeigelRich
CZ Active Member
WeigelRich has been a member for over 18 year's 18 Year Member
usa.gif pennsylvania.gif
Occupation: Safety Specialist
Age: 44
Gender: Male
Website:
Status: Offline
Joined: Jul 06, 2005
0.02 posts per day
Posts: 123
Points: 4,498
 Yahoo Messenger MSN Messenger 
Yeah. I think i am just going to remove it. Doesn't seem to want to work. thanks for the help. Note I did try that and got a page can't be defined. So not sure but thanks for the help.




_________________
Back to top Reply with quote
#10   re: Ne help with a Lottery Mod SQL Error
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 19 year's 19 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 46
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
Well I looked at the module and perhaps you missed this part on the install:

#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php

#
#-----[ FIND ]------------------------------------------
#
?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#
define('LOTTERY_TABLE', $prefix.'_lottery');
define('LOTTERY_HISTORY_TABLE', $prefix.'_lottery_history');

#




_________________
"The pursuit of easy things makes men weak."
-David O. McKay
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