PDA

View Full Version : Helping setting up game packages


Akira5284
12-01-2007, 11:23 AM
I'm currently extremly new to building web pages and i'm having issues configuring phpRaider. I got it installed properly, but I can't figure out how to set up a game package. I follow the instructions given, but I'm getting confused on how to "Run the install.sql"? I'm using phpMyAdmin.

I know how to get to the database, and I click on SQL, I just don't know what goes in the query box. I tried to copy the text from the sql into the box and got the error:
-------------------------------------------------------
Error
SQL query:

-- phpMyAdmin SQL Dump
-- version 2.9.0.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 19, 2007 at 07:44 AM
-- Server version: 5.0.27
-- PHP Version: 5.2.0
--
-- Database: `phpraider`
--
--
-- Dumping data for table `phpraider_attribute`
--
INSERT INTO `phpraider_attribute` ( `attribute_id` , `att_name` , `att_type` , `att_min` , `att_max` , `att_hover` , `att_show` , `att_icon` )
VALUES ( 1, 'Arcane Resistance', 'numeric', 0, 0, 0, 1, 'arcane_resistance.png' ) , ( 2, 'Fire Resistance', 'numeric', 0, 0, 0, 1, 'fire_resistance.png' ) , ( 3, 'Frost Resistance', 'numeric', 0, 0, 0, 1, 'frost_resistance.png' ) , ( 4, 'Nature Resistance', 'numeric', 0, 0, 0, 1, 'nature_resistance.png' ) , ( 5, 'Shadow Resistance', 'numeric', 0, 0, 0, 1, 'shadow_resistance.png' ) , ( 6, 'Damage Gear', 'numeric', 0, 0, 0, 1, 'damage_gear.png' ) , ( 7, 'Healing Gear', 'numeric', 0, 0, 0, 1, 'healing_gear.png' ) ;



MySQL said:

#1062 - Duplicate entry '1' for key 1
-------------------------------------------------------

And that is where i am lost. Any assiatance would be much appreciated. Thank you in advance.

SpiffyJr
12-01-2007, 11:52 AM
It looks like you already have information in your phpraider_attribute table - at least, that's what the duplicate entry error means.

Akira5284
12-01-2007, 12:06 PM
So to remove the info and clear that table I would just select the "Empty" action?

vendictive
12-24-2007, 10:34 AM
Personally, when I installed it, because I didn't want to mess anything up, I created a backup of the database.

Something to keep in mind is if your database prefix isn't phpraider_ you'll need to change each SQL table entry in that install.sql file to YOURPREFIX_TABLE. Here is an example of what I had to change for the attributes section:

FROM:
INSERT INTO `phpraider_attribute` (`attribute_id`, `att_name`, `att_type`, `att_min`, `att_max`, `att_hover`, `att_show`, `att_icon`) VALUES
(1, 'Arcane Resistance', 'numeric', 0, 0, 0, 1, 'arcane_resistance.png'),
(2, 'Fire Resistance', 'numeric', 0, 0, 0, 1, 'fire_resistance.png'),
(3, 'Frost Resistance', 'numeric', 0, 0, 0, 1, 'frost_resistance.png'),
(4, 'Nature Resistance', 'numeric', 0, 0, 0, 1, 'nature_resistance.png'),
(5, 'Shadow Resistance', 'numeric', 0, 0, 0, 1, 'shadow_resistance.png'),
(6, 'Damage Gear', 'numeric', 0, 0, 0, 1, 'damage_gear.png'),
(7, 'Healing Gear', 'numeric', 0, 0, 0, 1, 'healing_gear.png');

TO:
INSERT INTO `uuuguild_attribute` (`attribute_id`, `att_name`, `att_type`, `att_min`, `att_max`, `att_hover`, `att_show`, `att_icon`) VALUES
(1, 'Arcane Resistance', 'numeric', 0, 0, 0, 1, 'arcane_resistance.png'),
(2, 'Fire Resistance', 'numeric', 0, 0, 0, 1, 'fire_resistance.png'),
(3, 'Frost Resistance', 'numeric', 0, 0, 0, 1, 'frost_resistance.png'),
(4, 'Nature Resistance', 'numeric', 0, 0, 0, 1, 'nature_resistance.png'),
(5, 'Shadow Resistance', 'numeric', 0, 0, 0, 1, 'shadow_resistance.png'),
(6, 'Damage Gear', 'numeric', 0, 0, 0, 1, 'damage_gear.png'),
(7, 'Healing Gear', 'numeric', 0, 0, 0, 1, 'healing_gear.png');

You'll be able to find what your database prefix is by looking at the menu for your database on the left in phpMyAdmin. Look at the picture below to see why I have to change my table prefix to uuuguild_.

http://uuuguild.com/tutorials/phpraider_install/phpraider_database_select.JPG

If you want to remove possible wrong entries for the phpraider_attribute table, click on the SQL tab for phpMyAdmin and enter:

DELETE FROM `phpraider_attribute` (`attribute_id`, `att_name`, `att_type`, `att_min`, `att_max`, `att_hover`, `att_show`, `att_icon`) VALUES
(1, 'Arcane Resistance', 'numeric', 0, 0, 0, 1, 'arcane_resistance.png'),
(2, 'Fire Resistance', 'numeric', 0, 0, 0, 1, 'fire_resistance.png'),
(3, 'Frost Resistance', 'numeric', 0, 0, 0, 1, 'frost_resistance.png'),
(4, 'Nature Resistance', 'numeric', 0, 0, 0, 1, 'nature_resistance.png'),
(5, 'Shadow Resistance', 'numeric', 0, 0, 0, 1, 'shadow_resistance.png'),
(6, 'Damage Gear', 'numeric', 0, 0, 0, 1, 'damage_gear.png'),
(7, 'Healing Gear', 'numeric', 0, 0, 0, 1, 'healing_gear.png');

I'm only saying to do it that way because I don't remember if the attributes table was there before installing the game package and it would be bad to delete the table entirely if that was the fact.

Ok, so at this point you should be back to the start of installing the proper game-pack. I went ahead and did each SQL query individually from the install.sql file. I had to edit the prefix of each table to work successfully. The first table entry looked like this. Note the red rectangle outlines where I had to edit the prefix of my database.

http://uuuguild.com/tutorials/phpraider_install/phpraider_sql_entry.JPG

Hopefully this makes sense and helps you. I have a knack for making simple things sound harder than they are!