Page 1 of 1

or getting information from users table!

Posted: Wed Sep 20, 2006 5:50 pm
by miurdock

Code: Select all

Error getting information from users table!

DEBUG MODE

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

SELECT `username`, `user_items` FROM phpbb_users WHERE user_id='9'

Line : 174
File : lottery.php 
what is wrong?

Posted: Wed Sep 20, 2006 6:13 pm
by cybrid23
Well, since that is not a standard table, and that is not a standard phpbb file, you must have installed a Mod.

Did you remember to run the SQL queries for the Mod? Doesn't look like you did.

Check the Mod for the queries, or a php script to install the tables in your database.

Further support should be found where you obtained the Mod.

Posted: Thu Sep 21, 2006 8:01 am
by miurdock
Yes, it is mod.
But I have made all SQL queries.

Code: Select all

CREATE TABLE `phpbb_lottery`
	(`id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `user_id` INT (20) NOT NULL, PRIMARY KEY(`id`), INDEX(`user_id`));

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_cost', '1');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_ticktype', 'single');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_length', '500000');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_name', 'Lottery');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_base', '50');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_start', '0');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_reset', '0');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_status', '0');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_items', '0');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_win_items', '');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_show_entries', '0');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_mb', '0');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_mb_amount', '1');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_history', '1');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_currency', '');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_item_mcost', '1');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_item_xcost', '500');

INSERT INTO `phpbb_config` (config_name, config_value) VALUES ('lottery_random_shop', '');

CREATE TABLE `phpbb_lottery_history`
	(
		`id` INT UNSIGNED NOT NULL AUTO_INCREMENT, 
		`user_id` INT (20) NOT NULL, 
		`amount` INT (20) NOT NULL, 
		`currency` CHAR (32) NOT NULL, 
		`time` INT (20) NOT NULL, PRIMARY KEY(`id`), INDEX(`user_id`)
	);

Posted: Thu Sep 21, 2006 12:21 pm
by cybrid23
You are going to have to ask where you got the Mod. That table does not exist in your database, and it is not in those queries.

If you got the Mod here, then go to the thread for it in the Mod forum.

If you got it somewhere else, then you need to go there, or contact the author.

Posted: Thu Sep 21, 2006 3:00 pm
by drathbun
If my memory serves, the lottery MOD requires that the shop MOD be installed first. The Shop MOD creates the user_items field in the database. The Lottery MOD should have included a requirement for this...

Posted: Thu Sep 21, 2006 4:04 pm
by RMcGirr83
Actually the ability to have the shop items part of the lottery is selectable in the ACP for this mod.

www.zarath.com/mods is the latest site of the author (and of this mod)...he regularly visits phpbbhacks.com