seany123 Posted November 6, 2009 Share Posted November 6, 2009 i have two tables: dumps here.... -- phpMyAdmin SQL Dump -- version 3.2.0.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 06, 2009 at 01:26 AM -- Server version: 5.1.37 -- PHP Version: 5.3.0 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Database: `` -- -- -------------------------------------------------------- -- -- Table structure for table `blueprint_items` -- CREATE TABLE IF NOT EXISTS `blueprint_items` ( `id` int(11) NOT NULL AUTO_INCREMENT, `item_id` int(11) NOT NULL, `name` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '', `description` text COLLATE latin1_general_ci NOT NULL, `type` enum('weapon','armour','shoe','Consumable','pet','rare','parts','other') COLLATE latin1_general_ci NOT NULL DEFAULT 'weapon', `Value` int(11) NOT NULL DEFAULT '0', `shopcost` int(11) NOT NULL DEFAULT '0', `strengthbonus` int(11) NOT NULL DEFAULT '0', `defensebonus` int(11) NOT NULL DEFAULT '0', `speedbonus` int(11) NOT NULL DEFAULT '0', `powerbonus` int(11) NOT NULL DEFAULT '0', `torquebonus` int(11) NOT NULL DEFAULT '0', `weightbonus` int(11) NOT NULL DEFAULT '0', `img` varchar(255) COLLATE latin1_general_ci NOT NULL, `features` varchar(255) COLLATE latin1_general_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=96 ; -- -- Dumping data for table `blueprint_items` -- INSERT INTO `blueprint_items` (`id`, `item_id`, `name`, `description`, `type`, `Value`, `shopcost`, `strengthbonus`, `defensebonus`, `speedbonus`, `powerbonus`, `torquebonus`, `weightbonus`, `img`, `features`) VALUES (1, 1, 'Awake Pill', 'An item that restores your awake when used.', 'Consumable', 0, 0, 0, 0, 0, 0, 0, 0, 'http://www.futurederm.com/wp-content/uploads/2008/03/031408-pill.jpg', '- refill awake 100% '), (2, 2, 'Hammer', 'A weapon used to attack other mobsters.', 'weapon', 1000, 1500, 3, 0, 0, 0, 0, 0, 'http://z.about.com/d/homerepair/1/0/s/-/-/-/hammer.jpg', '- Strength bonus 3%'), (3, 0, 'Baseball Bat', 'A weapon used to attack other mobsters.', 'weapon', 2000, 3000, 5, 0, 0, 0, 0, 0, 'http://www.midwaypartyrental.com/images/products/baseball_bat.jpg', '- Strength bonus 5%'), (4, 0, 'Crow Bar', 'A weapon used to attack other mobsters.', 'weapon', 10000, 15000, 10, 0, 0, 0, 0, 0, 'http://www.steritool.com/images/product/10294.jpg', '- Strength bonus 10%'), (5, 0, 'Kitchen Knife', 'A weapon used to attack other mobsters.', 'weapon', 20000, 30000, 15, 0, 0, 0, 0, 0, 'http://womenofcaliber.files.wordpress.com/2009/07/self-defense-kitchen-knife1.jpg', '- Stength bonus 15%'), (6, 0, 'Axe', 'A weapon used to attack other mobsters.', 'weapon', 160000, 240000, 25, 0, 0, 0, 0, 0, 'http://mafiakillerz.com/img/items/NONO.png', '- Stength bonus 25%'), (7, 0, 'Chainsaw', 'A weapon used to attack other mobsters.', 'weapon', 320000, 480000, 35, 0, 0, 0, 0, 0, 'http://www.howdididoit.com/wp-content/uploads/2008/01/chainsaw.jpg', '- Stength bonus 35%'), (8, 0, 'Rags', 'Armour used to defend yourself from other mobster attacks.', 'armour', 1000, 1500, 0, 3, 0, 0, 0, 0, '', '- Defense bonus 3%'), (9, 0, 'Padded Shirt', 'A piece of armour used to defend yourself from other citizen attacks.', 'armour', 2000, 3000, 0, 5, 0, 0, 0, 0, '', '- Defense bonus 5%'), (10, 0, 'Leather Vest', 'A piece of armour used to defend yourself from other citizen attacks.', 'armour', 10000, 15000, 0, 10, 0, 0, 0, 0, '', '- Defense bonus 10%'), (11, 0, 'Chainmail', 'A piece of armour used to defend yourself from other citizen attacks.', 'armour', 20000, 30000, 0, 15, 0, 0, 0, 0, '', '- Defense bonus 15%'), (12, 0, 'Platebody', 'A piece of armour used to defend yourself from other citizen attacks.', 'armour', 160000, 240000, 0, 25, 0, 0, 0, 0, '', '- Defense bonus 25%'), (13, 0, 'Bullet Proof Vest', 'A piece of armour used to defend yourself from other citizen attacks.', 'armour', 320000, 480000, 0, 35, 0, 0, 0, 0, '', '- Defense bonus 35%'), (14, 0, 'Meat Cleaver', 'A weapon used to attack other mobsters.', 'weapon', 100000, 160000, 20, 0, 0, 0, 0, 0, '', '- Strength bonus 20%'), (15, 0, 'Sledgehammer', 'A weapon used to attack other mobsters.', 'weapon', 240000, 360000, 30, 0, 0, 0, 0, 0, '', '- Strength bonus 30%'), (16, 0, 'Wrench', 'A weapon used to attack other mobsters.', 'weapon', 20000, 30000, 13, 0, 0, 0, 0, 0, '', '- Strength bonus 13%'), (17, 0, 'Machete', 'A weapon used to attack other mobsters.', 'weapon', 80000, 120000, 18, 0, 0, 0, 0, 0, '', '- Strength bonus 18%'), (18, 0, 'Medi-Kit (25%)', 'An item that heals yourself when used (HP).', 'Consumable', 10000, 15000, 0, 0, 0, 0, 0, 0, 'http://mafiakillerz.com/img/items/18.jpg', '- HP Restore: 25%'), (19, 0, 'Medi-Kit (50%)', 'An item that heals yourself when used (HP).', 'Consumable', 15000, 22500, 0, 0, 0, 0, 0, 0, 'http://mafiakillerz.com/img/items/19.jpg', '- HP Restore: 50%'), (20, 0, 'Medi-Kit (75%)', 'An item that heals yourself when used (HP).', 'Consumable', 20000, 30000, 0, 0, 0, 0, 0, 0, 'http://mafiakillerz.com/img/items/20.jpg', '- HP Restore: 75%'), (21, 0, 'Medi-Kit (100%)', 'An item that heals yourself when used (HP).', 'Consumable', 25000, 37500, 0, 0, 0, 0, 0, 0, 'http://mafiakillerz.com/img/items/21.jpg', '- HP Restore: 100%'), (22, 0, 'Police Revolver', 'A weapon used to attack other mobsters.', 'weapon', 320000, 480000, 36, 0, 0, 0, 0, 0, '', '- Strength bonus: 36%'), (23, 0, '1911 Colt', 'A weapon used to attack other mobsters.', 'weapon', 500000, 750000, 40, 0, 0, 0, 0, 0, '', '- Strength bonus: 40%'), (24, 0, 'Sawn-off Shotgun', 'A weapon used to attack other mobsters.', 'weapon', 620000, 930000, 43, 0, 0, 0, 0, 0, '', '- Strength bonus: 43%'), (25, 0, 'Pump Action Shotgun', 'A weapon used to attack other mobsters.', 'weapon', 650000, 975000, 45, 0, 0, 0, 0, 0, '', '- Strength bonus: 45%'), (26, 0, '1927 Thompson', 'A weapon used to attack other mobsters.', 'weapon', 900000, 1350000, 50, 0, 0, 0, 0, 0, '', '- Strength bonus: 50%'), (27, 0, 'Medical Certificate (25%)', 'An item that reduces your stay in hospital when used.', 'Consumable', 30000, 45000, 0, 0, 0, 0, 0, 0, '', '- Hospital time: - 25%'), (28, 0, 'Medical Certificate (50%)', 'An item that reduces your stay in hospital when used.', 'Consumable', 45000, 67500, 0, 0, 0, 0, 0, 0, '', '- Hospital time: - 50%'), (29, 0, 'Medical Certificate (75%)', 'An item that reduces your stay in hospital when used.', 'Consumable', 60000, 90000, 0, 0, 0, 0, 0, 0, '', '- Hospital time: - 75%'), (30, 0, 'Medical Certificate (100%)', 'An item that reduces your stay in hospital when used.', 'Consumable', 75000, 112500, 0, 0, 0, 0, 0, 0, '', '- Hospital time: - 100%'), (31, 0, 'Interceptor Body Armour', 'A piece of armour used to defend yourself from other mobster attacks.', 'armour', 650000, 975000, 0, 45, 0, 0, 0, 0, '', '- Defense bonus: 45%'), (32, 0, 'Modular Tactical Vest', 'A piece of armour used to defend yourself from other mobster attacks.', 'armour', 500000, 750000, 0, 40, 0, 0, 0, 0, '', '- Defense bonus: 40%'), (33, 0, 'Luger P08', 'A weapon used to attack other mobster.', 'weapon', 280000, 420000, 33, 0, 0, 0, 0, 0, '', '- Defense bonus: 33%'), (34, 0, 'Jehrico 941F', 'A weapon used to attack other mobsters.', 'weapon', 470000, 705000, 38, 0, 0, 0, 0, 0, '', '- Strength bonus: 38%'), (35, 0, 'Browning Hi-Power', 'A weapon used to attack other mobsters.', 'weapon', 540000, 810000, 42, 0, 0, 0, 0, 0, '', '- Strength bonus: 42%'), (36, 0, 'CMP-150', 'A weapon used to attack other mobster.', 'weapon', 400000, 600000, 37, 0, 0, 0, 0, 0, '', '- Strength bonus: 37%'), (37, 0, 'MP40', 'A weapon used to attack other mobsters.', 'weapon', 490000, 735000, 39, 0, 0, 0, 0, 0, '', '- Strength bonus: 39%'), (38, 0, 'MP5', 'A weapon used to attack other mobsters.', 'weapon', 520000, 780000, 41, 0, 0, 0, 0, 0, '', '- Strength bonus: 41%'), (39, 0, 'DW-P5', 'A weapon used to attack other mobsters.', 'weapon', 630000, 945000, 44, 0, 0, 0, 0, 0, '', '- Strength bonus: 44%'), (40, 0, 'Gewehr 3', 'A weapon used to attack other mobsters.', 'weapon', 800000, 1200000, 48, 0, 0, 0, 0, 0, '', '- Strength bonus: 48%'), (41, 0, 'RCP90', 'A weapon used to attack other mobsters.', 'weapon', 1200000, 1800000, 54, 0, 0, 0, 0, 0, '', '- Strength bonus: 54%'), (42, 0, 'FN SCAR', 'A weapon used to attack other mobsters.', 'weapon', 1400000, 2100000, 57, 0, 0, 0, 0, 0, '', '- Strength bonus: 57%'), (43, 0, 'Flak Jacket', 'A piece of armour used to defend yourself from other mobster attacks.', 'armour', 800000, 1200000, 0, 50, 0, 0, 0, 0, '', '- Defense bonus: 50%'), (44, 0, 'Panzer 1918', 'A piece of armour used to defend yourself from other mobster attacks.', 'armour', 240000, 360000, 0, 30, 0, 0, 0, 0, '', '- Defense bonus: 30%'), (45, 0, 'Cannabis', 'A drug that boosts your stats temporarily.', 'Consumable', 28000, 42000, 5, 10, 5, 0, 0, 0, '', '- Strength bonus: 5%, Defense bonus: 10%, Speed bonus: 5% '), (46, 0, 'Speed', 'A drug that boosts your stats temporarily.', 'Consumable', 56000, 84000, 10, 10, 20, 0, 0, 0, '', '- Strength bonus: 10%, Defense bonus: 10%, Speed bonus: 20% '), (47, 0, 'LSD', 'A drug that boosts your stats temporarily.', 'Consumable', 80000, 120000, 25, 20, 15, 0, 0, 0, '', '- Strength bonus: 25%, Defense bonus: 20%, Speed bonus: 15% '), (48, 0, 'Cocaine', 'A drug that boosts your stats temporarily.', 'Consumable', 108000, 162000, 25, 25, 30, 0, 0, 0, '', '- Strength bonus: 25%, Defense bonus: 25%, Speed bonus: 30% '), (49, 0, 'Heroin', 'A drug that boosts your stats temporarily.', 'Consumable', 140000, 210000, 35, 35, 30, 0, 0, 0, '', '- Strength bonus: 35%, Defense bonus: 35%, Speed bonus: 30% '), (50, 0, 'Acura V6', 'A V6 engine to power your car.', 'parts', 40000, 60000, 0, 0, 0, 240, 220, 200, '', '- Power bonus: 240, Torque bonus: 220, Weight bonus: 200 '), (51, 0, 'Subaru Opposed-4', 'An Opposed-4 engine to power your car.', 'parts', 28000, 42000, 0, 0, 0, 200, 160, 140, '', '- Power bonus: 200, Torque bonus: 160, Weight bonus: 140 '), (52, 0, 'Nissan I6', 'An I6 engine to power your car.', 'parts', 16000, 24000, 0, 0, 0, 130, 160, 140, '', '- Power bonus: 130, Torque bonus: 160, Weight bonus: 140 '), (53, 0, 'Ford Small Block V8', 'A Small Block V8 to power your car.', 'parts', 53000, 80000, 0, 0, 0, 160, 230, 200, '', '- Power bonus: 160, Torque bonus: 230, Weight bonus: 200 '), (54, 0, 'Ford Big Block V8', 'A Big Block V8 to power your car.', 'parts', 0, 0, 0, 0, 0, 270, 340, 260, '', '- Power bonus: 270, Torque bonus: 340, Weight bonus: 260 '), (55, 0, 'Ford V6', 'A V6 engine to power your car.', 'parts', 21000, 32000, 0, 0, 0, 100, 170, 150, '', '- Power bonus: 100, Torque bonus: 170, Weight bonus: 150 '), (56, 0, 'Stock Exhaust', 'A stock exhaust for your car.', 'parts', 8000, 12000, 0, 0, 0, 15, 0, 5, '', '- Power bonus: 15, Torque bonus: 0, Weight bonus: 5 '), (57, 0, 'Dual Exhausts', 'Dual exhausts for your car.', 'parts', 13000, 20000, 0, 0, 0, 30, 0, 15, '', '- Power bonus: 30, Torque bonus: 0, Weight bonus: 15 '), (58, 0, 'Performance Exhaust', 'A performance exhaust for your car.', 'parts', 16000, 24000, 0, 0, 0, 35, 0, 5, '', '- Power bonus: 35, Torque bonus: 0, Weight bonus: 5 '), (59, 0, 'Quad Exhausts', 'Quad Exhausts for your car.', 'parts', 0, 0, 0, 0, 0, 60, 0, 30, '', '- Power bonus: 60, Torque bonus: 0, Weight bonus: 30 '), (60, 0, 'Small Turbocharger', 'A small turbocharger for your car.', 'parts', 23000, 35000, 0, 0, 0, 50, 90, 20, '', '- Power bonus: 50, Torque bonus: 90, Weight bonus: 20 '), (61, 0, 'Large Turbocharger', 'A large turbocharger for your car.', 'parts', 40000, 60000, 0, 0, 0, 80, 140, 30, '', '- Power bonus: 80, Torque bonus: 140, Weight bonus: 30 '), (62, 0, 'Stock Suspension', 'Stock Suspension for your car.', 'parts', 22000, 34000, 0, 0, 0, 0, 0, 250, '', '- Power bonus: 0, Torque bonus: 0, Weight bonus: 250 '), (63, 0, 'Racing Suspension', 'Racing Suspension for your car.', 'parts', 43000, 65000, 0, 0, 0, 0, 0, 120, '', '- Power bonus: 0, Torque bonus: 0, Weight bonus: 120 '), (64, 0, 'Small Supercharger', 'A small supercharger for your car.', 'parts', 35000, 50000, 0, 0, 0, 80, 140, 35, '', '- Power bonus: 80, Torque bonus: 140, Weight bonus: 35 '), (65, 0, 'Large Supercharger', 'A large supercharger for your car.', 'parts', 0, 0, 0, 0, 0, 170, 230, 60, '', '- Power bonus: 170, Torque bonus: 230, Weight bonus: 60 '), (66, 0, 'Dual Performance Exhausts', 'Dual Performance Exhausts for your car.', 'parts', 0, 0, 0, 0, 0, 45, 0, 15, '', '- Power bonus: 45, Torque bonus: 0, Weight bonus: 15 '), (67, 0, 'Subaru Flat-4', 'A Flat-4 engine to power your car.', 'parts', 40000, 60000, 0, 0, 0, 210, 260, 120, '', '- Power bonus: 210, Torque bonus: 260, Weight bonus: 120 '), (68, 0, 'Mazda Double Rotary', 'A Double Rotary Engine to power your car.', 'parts', 80000, 120000, 0, 0, 0, 230, 260, 180, '', ''), (69, 0, 'Strength Up (+5)', 'Increases your pet''s strength!', 'pet', 80000, 120000, 5, 0, 0, 0, 0, 0, '', ''), (70, 0, 'Defense Up (+5)', 'Increases your pet''s defense!', 'pet', 80000, 120000, 0, 5, 0, 0, 0, 0, '', ''), (71, 0, 'Speed Up (+5)', 'Increases your pet''s speed!', 'pet', 80000, 120000, 0, 0, 5, 0, 0, 0, '', ''), (72, 0, 'HP Up (+5)', 'Increases your pet''s HP!\r\n', 'pet', 120000, 180000, 0, 0, 0, 0, 0, 0, '', ''), (73, 0, 'Christmas Hat (2007)', 'A rare item from the Christmas period of 2009!', 'rare', 0, 0, 0, 0, 0, 0, 0, 0, '', ''), (74, 0, 'Christmas Cracker (2007)', 'A rare item from the Christmas period of 2007!', 'rare', 0, 0, 0, 0, 0, 0, 0, 0, '', ''), (75, 0, 'Colt King Cobra', 'A weapon used to attack other mobsters.\r\n', 'weapon', 1000000, 1500000, 52, 0, 0, 0, 0, 0, '', ''), (76, 0, 'AK-47', 'A weapon used to attack other mobsters.', 'weapon', 1900000, 2850000, 59, 0, 0, 0, 0, 0, '', ''), (77, 0, 'RPG-7', 'A weapon used to attack other mobsters.', 'weapon', 2800000, 4200000, 65, 0, 0, 0, 0, 0, '', ''), (78, 0, 'DragonSkin Tactical Vest', 'A piece of armour used to defend yourself from other mobster attacks.', 'armour', 1200000, 1800000, 0, 54, 0, 0, 0, 0, '', ''), (79, 0, 'Camouflage Vest', 'A piece of armour used to defend yourself from other mobster attacks.', 'armour', 1500000, 2250000, 0, 57, 0, 0, 0, 0, '', ''), (80, 0, 'Easter Egg', 'A rare item from the Easter period of 2009!', 'rare', 0, 0, 0, 0, 0, 0, 0, 0, '', ''), (81, 0, 'Chevrolet 7.0L LS7', 'A 7.0L LS7 to power your car.', 'parts', 0, 0, 0, 0, 0, 331, 380, 275, '', ''), (82, 0, 'Butterfly Knife', 'A weapon used to attack other citizens.', 'weapon', 360000, 540000, 37, 0, 0, 0, 0, 0, '', ''), (83, 0, 'M4 Carbine', 'A weapon used to attack other mobsters.', 'weapon', 2300000, 3450000, 61, 0, 0, 0, 0, 0, '', ''), (84, 0, 'HK USP45 Silenced', 'A weapon used to attack other mobsters.', 'weapon', 1400000, 2100000, 54, 0, 0, 0, 0, 0, '', ''), (85, 0, 'STF Liquid Armour', 'A piece of armour used to defend yourself from other citizen mobsters.', 'armour', 2800000, 4200000, 0, 65, 0, 0, 0, 0, '', ''), (86, 0, 'Moccasins', 'Shoes used to increase your speed in battle.', 'shoe', 5000, 7500, 0, 0, 3, 0, 0, 0, '', ''), (87, 0, 'Thongs', 'Shoes used to increase your speed in battle.', 'shoe', 25000, 37500, 0, 0, 6, 0, 0, 0, '', ''), (88, 0, 'Steel Sandals', 'Shoes used to increase your speed in battle.', 'shoe', 100000, 150000, 0, 0, 10, 0, 0, 0, '', ''), (89, 0, 'Cowboy Boots', 'Shoes used to increase your speed in battle.', 'shoe', 160000, 240000, 0, 0, 16, 0, 0, 0, '', ''), (90, 0, 'Aussie Work Boots', 'Shoes used to increase your speed in battle.', 'shoe', 240000, 360000, 0, 0, 19, 0, 0, 0, '', ''), (91, 0, 'Walking Shoes', 'Shoes used to increase your speed in battle.', 'shoe', 350000, 525000, 0, 0, 26, 0, 0, 0, '', ''), (92, 0, 'Sneakers', 'Shoes used to increase your speed in battle.', 'weapon', 900000, 1200000, 0, 0, 34, 0, 0, 0, '', ''), (93, 0, 'Runners', 'Shoes used to increase your speed in battle.', 'shoe', 1600000, 2400000, 0, 0, 40, 0, 0, 0, '', ''), (94, 0, 'Track Shoes', 'Shoes used to increase your speed in battle.', 'shoe', 2400000, 3600000, 0, 0, 48, 0, 0, 0, '', ''), (95, 0, 'Stilettos', 'Shoes used to increase your speed in battle.', 'shoe', 1200000, 1800000, 0, 0, 37, 0, 0, 0, '', ''); -- -------------------------------------------------------- -- -- Table structure for table `items` -- CREATE TABLE IF NOT EXISTS `items` ( `id` int(11) NOT NULL AUTO_INCREMENT, `player_id` int(11) NOT NULL DEFAULT '0', `item_id` int(11) NOT NULL DEFAULT '0', `status` enum('equipped','unequipped') COLLATE latin1_general_ci NOT NULL DEFAULT 'unequipped', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=151 ; -- -- Dumping data for table `items` -- INSERT INTO `items` (`id`, `player_id`, `item_id`, `status`) VALUES (17, 1, 18, 'unequipped'), (148, 1, 18, 'unequipped'), (150, 1, 1, 'unequipped'); -- -- Table structure for table `players` -- CREATE TABLE IF NOT EXISTS `players` ( `id` int(11) NOT NULL AUTO_INCREMENT, `rm` varchar(11) COLLATE latin1_general_ci NOT NULL DEFAULT '0', `username` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '', `password` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '', `email` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '', `xaccess` tinyint(4) NOT NULL DEFAULT '0', `registered` int(11) NOT NULL DEFAULT '0', `last_active` int(11) NOT NULL DEFAULT '0', `ip` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '', `level` int(11) NOT NULL DEFAULT '1', `maxlevel` int(11) NOT NULL DEFAULT '500', `points` bigint(255) NOT NULL DEFAULT '0', `money` bigint(255) NOT NULL DEFAULT '0', `bank` int(11) NOT NULL DEFAULT '0', `maxbank` int(11) NOT NULL DEFAULT '30000000', `hp` int(11) NOT NULL DEFAULT '100', `maxhp` int(11) NOT NULL DEFAULT '100', `exp` int(11) NOT NULL DEFAULT '0', `maxexp` int(11) NOT NULL DEFAULT '494', `energy` int(11) NOT NULL DEFAULT '10', `maxenergy` int(11) NOT NULL DEFAULT '10', `nerve` int(11) NOT NULL DEFAULT '10', `maxnerve` int(11) NOT NULL DEFAULT '10', `awake` int(11) NOT NULL DEFAULT '100', `maxawake` int(11) NOT NULL DEFAULT '100', `strength` bigint(255) NOT NULL DEFAULT '10', `defense` bigint(255) NOT NULL DEFAULT '10', `speed` bigint(255) NOT NULL DEFAULT '10', `total` bigint(255) NOT NULL DEFAULT '30', `interest` tinyint(1) NOT NULL DEFAULT '0', `kills` int(11) NOT NULL DEFAULT '0', `deaths` int(11) NOT NULL DEFAULT '0', `searchdowntown1` int(11) NOT NULL DEFAULT '1', `searchdowntown2` int(11) NOT NULL DEFAULT '1', `luckydip` int(11) NOT NULL DEFAULT '1', `Players_Job_ID` int(11) NOT NULL DEFAULT '0', `P_Job_Skill` int(11) NOT NULL DEFAULT '0', `ref` int(11) NOT NULL DEFAULT '0', `dead_time_remaining` int(11) NOT NULL DEFAULT '0', `weapon_used_id` int(11) NOT NULL DEFAULT '0', `killed_by_id` int(11) NOT NULL DEFAULT '0', `city_id` int(11) NOT NULL DEFAULT '1', `gender` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT 'Unknown', `house_id` int(11) NOT NULL DEFAULT '0', `style` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '', `crimes_failed` int(11) NOT NULL DEFAULT '0', `crimes_sucess` int(11) NOT NULL DEFAULT '0', `staff` int(11) NOT NULL DEFAULT '0', `investment_id` varchar(11) COLLATE latin1_general_ci NOT NULL DEFAULT '0', `investment_time` int(11) NOT NULL DEFAULT '0', `prison` int(11) NOT NULL DEFAULT '0', `prison_caught` int(11) NOT NULL DEFAULT '0', `prison_bust` int(11) NOT NULL DEFAULT '0', `hospital` int(11) NOT NULL DEFAULT '0', `crimes_money` bigint(11) NOT NULL DEFAULT '0', `notepad` text COLLATE latin1_general_ci NOT NULL, `recover` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '', `ncolor` int(11) NOT NULL DEFAULT '0', `ncolorid` varchar(20) COLLATE latin1_general_ci NOT NULL DEFAULT 'CC0000', `banned` varchar(11) COLLATE latin1_general_ci NOT NULL DEFAULT '0', `signature` text COLLATE latin1_general_ci NOT NULL, `battle_money` bigint(11) NOT NULL DEFAULT '0', `battle_won` bigint(11) NOT NULL DEFAULT '0', `battle_lost` bigint(11) NOT NULL DEFAULT '0', `quote` varchar(50) COLLATE latin1_general_ci NOT NULL DEFAULT 'No Quote', `rating` int(11) NOT NULL DEFAULT '0', `avatar` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '', `gang_id` int(11) DEFAULT NULL, `gang_upgrade` int(1) NOT NULL DEFAULT '0', `gang_edit` int(1) NOT NULL DEFAULT '0', `gang_vault` int(1) NOT NULL DEFAULT '0', `gang_members` int(1) NOT NULL DEFAULT '0', `gang_mail` int(1) NOT NULL DEFAULT '0', `gang_crime` int(1) NOT NULL DEFAULT '0', `gang_ranks` int(1) NOT NULL DEFAULT '0', `battle_total` int(11) NOT NULL DEFAULT '0', `lottery` int(1) NOT NULL DEFAULT '0', `validated` int(11) NOT NULL DEFAULT '0', `validkey` varchar(255) COLLATE latin1_general_ci NOT NULL, `update` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `searchdowntown` (`searchdowntown1`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci PACK_KEYS=1 AUTO_INCREMENT=1018 ; -- -- Dumping data for table `players` -- INSERT INTO `players` (`id`, `rm`, `username`, `password`, `email`, `xaccess`, `registered`, `last_active`, `ip`, `level`, `maxlevel`, `points`, `money`, `bank`, `maxbank`, `hp`, `maxhp`, `exp`, `maxexp`, `energy`, `maxenergy`, `nerve`, `maxnerve`, `awake`, `maxawake`, `strength`, `defense`, `speed`, `total`, `interest`, `kills`, `deaths`, `searchdowntown1`, `searchdowntown2`, `luckydip`, `Players_Job_ID`, `P_Job_Skill`, `ref`, `dead_time_remaining`, `weapon_used_id`, `killed_by_id`, `city_id`, `gender`, `house_id`, `style`, `crimes_failed`, `crimes_sucess`, `staff`, `investment_id`, `investment_time`, `prison`, `prison_caught`, `prison_bust`, `hospital`, `crimes_money`, `notepad`, `recover`, `ncolor`, `ncolorid`, `banned`, `signature`, `battle_money`, `battle_won`, `battle_lost`, `quote`, `rating`, `avatar`, `gang_id`, `gang_upgrade`, `gang_edit`, `gang_vault`, `gang_members`, `gang_mail`, `gang_crime`, `gang_ranks`, `battle_total`, `lottery`, `validated`, `validkey`, `update`) VALUES (1, '134', 'adminsean', 'PASSWORD', '[email protected]', 100, 1220148866, 1257470641, '90.218.116.186', 7, 500, 83072, 1078435, 89813597, 155000000, 70, 70, 3141, 3459, 703, 703, 16, 16, 6357, 10000, 353044, 6104313, 1459279, 6995801, 0, 19, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 'Male', 16, '', 297, 776, 5, '10', 10, 0, 0, 0, 0, 0, '1,2,2,3,4,5,4,5,4,5,44,84', 'mUMDhvM', 1, 'Aqua', '0', '<b>Hello1</b>', 66347525, 116, 7, 'HELLO', 300, 'http://oregonstate.edu/cws/webtrain/sites/default/files/image-administrator.png', 13, 0, 0, 0, 0, 0, 0, 0, 73, 0, 1, '121458c9600c1ea6fa179c70950575a8', 0); Now what i wanna do is get firstly get information from the items table WHERE $player->id = player_id.. note - $player->id is from players tables and is a working array. Then i wanna echo all the rows in the items tables using the data from blueprint_items table using this: items_id (from items table) and id (from blueprint_items) Now the catch is i dont want to echo any rows with the same item_id twice... SO it wont echo DUPES instead it just echo's 1 row and also says something like Quantity = 2 etc... i have been over at the SQL help and they gave me this code... to try get the information... but i dont know how to incorporate it.... SELECT bi.img AS blueprintimg, bi.id AS blueprintid, bi.name AS blueprintname, i.id AS itemid FROM players p JOIN ( SELECT player_id, MAX( id ) AS id, COUNT( id ) AS num_items FROM items WHERE player_id =1 GROUP BY player_id )items_sub ON p.id = items_sub.player_id JOIN items i ON items_sub.id = i.id JOIN blueprint_items bi ON i.item_id = bi.item_id WHERE p.id =1 Finally before trying to get help this is the page i had.... <?php include("lib.php"); define("PAGENAME", "MafiaKiller"); $player = check_user($secret_key, $db); include("templates/private_header3.php"); ?> <div id="left_c"> <div class="g_content"><h3> Equipment</h3><div class="g_text"> <table align='center' cellspacing='10'> <?php $current_col = 1; $max_col = 4; $query = $db->execute("select * from items where `player_id`=?", array($player->id)); while($item = $query->fetchrow()) { $query2 = $db->execute("select * from `blueprint_items` where `id`=?",array($item['item_id'])); $item2 = $query2->fetchrow(); if($item['status'] == 'equipped'){ //Open new row if first column if($current_col==1) { echo "<tr>\n"; } //Display current record echo "<td>"; echo "<center><img src=\"{$item2['img']}\" width='80' height='80' style=\"border: 1px solid #CC9900\"></center>"; echo "<center><a href=\"../description.php?id={$item2['id']}\">{$item2['name']}</a></center>"; echo "<center>[<a href='../item.php?sell=".$item['id']."'>Sell</a>] [<a href='../item.php?market=".$item['id']."'>Market</a>] <br>[<a href='../item.php?send=".$item['id']."'>Send</a>] [<a href='../item.php?use=".$item['id']."'>Use</a>]</center><br>"; echo "</td>\n"; //Close row if last column if($current_col==$max_col) { echo "<tr>\n"; $current_col = 0; //<---Changed } $current_col++; } } //Close last row if needed if ($current_col!=1) { for(; $current_col<=$max_col; $current_col++) { echo "<td> </td>\n"; } } ?> </table> </div></div> <div class="g_content"><h3> Weapons</h3><div class="g_text"> <table align='center' cellspacing='10'> <?php $current_col = 1; $max_col = 4; $query = $db->execute("select * from items where `player_id`=?", array($player->id)); while($item = $query->fetchrow()) { $query2 = $db->execute("select * from `blueprint_items` where `id`=?",array($item['item_id'])); $item2 = $query2->fetchrow(); if($item2['type'] == 'weapon'){ if($item['status'] != 'equipped'){ //Open new row if first column if($current_col==1) { echo "<tr>\n"; } //Display current record echo "<td>"; echo "<center><img src=\"{$item2['img']}\" width='80' height='80' style=\"border: 1px solid #CC9900\"></center>"; echo "<center><a href=\"../description.php?id={$item2['id']}\">{$item2['name']}</a></center>"; echo "<center>[<a href='../item.php?sell=".$item['id']."'>Sell</a>] [<a href='../item.php?market=".$item['id']."'>Market</a>] <br>[<a href='../item.php?send=".$item['id']."'>Send</a>] [<a href='../item.php?equip=".$item['id']."'>Equip</a>]</center><br>"; echo "</td>\n"; //Close row if last column if($current_col==$max_col) { echo "<tr>\n"; $current_col = 0; //<---Changed } $current_col++; } } } //Close last row if needed if ($current_col!=1) { for(; $current_col<=$max_col; $current_col++) { echo "<td> </td>\n"; } } ?> </table> </div></div> <div class="g_content"><h3> Armour</h3><div class="g_text"> <table align='center' cellspacing='10'> <?php $current_col = 1; $max_col = 4; $query = $db->execute("select * from items where `player_id`=?", array($player->id)); while($item = $query->fetchrow()) { $query2 = $db->execute("select * from `blueprint_items` where `id`=?",array($item['item_id'])); $item2 = $query2->fetchrow(); if($item2['type'] == 'armour'){ if($item['status'] == 'equipped'){ //Open new row if first column if($current_col==1) { echo "<tr>\n"; } //Display current record echo "<td>"; echo "<center><img src=\"{$item2['img']}\" width='80' height='80' style=\"border: 1px solid #CC9900\"></center>"; echo "<center><a href=\"../description.php?id={$item2['id']}\">{$item2['name']}</a></center>"; echo "<center>[<a href='../item.php?sell=".$item['id']."'>Sell</a>] [<a href='../item.php?market=".$item['id']."'>Market</a>] <br>[<a href='../item.php?send=".$item['id']."'>Send</a>] [<a href='../item.php?equip=".$item['id']."'>equip</a>]</center><br>"; echo "</td>\n"; //Close row if last column if($current_col==$max_col) { echo "<tr>\n"; $current_col = 0; //<---Changed } $current_col++; } } } //Close last row if needed if ($current_col!=1) { for(; $current_col<=$max_col; $current_col++) { echo "<td> </td>\n"; } } ?> </table> </div></div> <div class="g_content"><h3> Shoes</h3><div class="g_text"> <table align='center' cellspacing='10'> <?php $current_col = 1; $max_col = 4; $query = $db->execute("select * from items where `player_id`=?", array($player->id)); while($item = $query->fetchrow()) { $query2 = $db->execute("select * from `blueprint_items` where `id`=?",array($item['item_id'])); $item2 = $query2->fetchrow(); if($item2['type'] == 'shoe'){ if($item['status'] == 'equipped'){ //Open new row if first column if($current_col==1) { echo "<tr>\n"; } //Display current record echo "<td>"; echo "<center><img src=\"{$item2['img']}\" width='80' height='80' style=\"border: 1px solid #CC9900\"></center>"; echo "<center><a href=\"../description.php?id={$item2['id']}\">{$item2['name']}</a></center>"; echo "<center>[<a href='../item.php?sell=".$item['id']."'>Sell</a>] [<a href='../item.php?market=".$item['id']."'>Market</a>] <br>[<a href='../item.php?send=".$item['id']."'>Send</a>] [<a href='../item.php?equip=".$item['id']."'>equip</a>]</center><br>"; echo "</td>\n"; //Close row if last column if($current_col==$max_col) { echo "<tr>\n"; $current_col = 0; //<---Changed } $current_col++; } } } //Close last row if needed if ($current_col!=1) { for(; $current_col<=$max_col; $current_col++) { echo "<td> </td>\n"; } } ?> </table> </div></div> <div class="g_content"><h3> Consumables</h3><div class="g_text"> <table align='center' cellspacing='10'> <?php $current_col = 1; $max_col = 4; $query = $db->execute("select * from items where `player_id`=?", array($player->id)); while($item = $query->fetchrow()) { $query2 = $db->execute("select * from `blueprint_items` where `id`=?",array($item['item_id'])); $item2 = $query2->fetchrow(); if($item2['type'] == 'Consumable'){ //Open new row if first column if($current_col==1) { echo "<tr>\n"; } //Display current record echo "<td>"; echo "<center><img src=\"{$item2['img']}\" width='80' height='80' style=\"border: 1px solid #CC9900\"></center>"; echo "<center><a href=\"../description.php?id={$item2['id']}\">{$item2['name']}</a></center>"; echo "<center>[<a href='../item.php?sell=".$item['id']."'>Sell</a>] [<a href='../item.php?market=".$item['id']."'>Market</a>] <br>[<a href='../item.php?send=".$item['id']."'>Send</a>] [<a href='../item.php?use=".$item['id']."'>Use</a>]</center><br>"; echo "</td>\n"; //Close row if last column if($current_col==$max_col) { echo "<tr>\n"; $current_col = 0; //<---Changed } $current_col++; } } //Close last row if needed if ($current_col!=1) { for(; $current_col<=$max_col; $current_col++) { echo "<td> </td>\n"; } } ?> </table> </div></div> <div class="g_content"><h3> Pets</h3><div class="g_text"> <table align='center' cellspacing='10'> <?php $current_col = 1; $max_col = 4; $query = $db->execute("select * from items where `player_id`=?", array($player->id)); while($item = $query->fetchrow()) { $query2 = $db->execute("select * from `blueprint_items` where `id`=?",array($item['item_id'])); $item2 = $query2->fetchrow(); if($item2['type'] == 'pet'){ //Open new row if first column if($current_col==1) { echo "<tr>\n"; } //Display current record echo "<td>"; echo "<center><img src=\"{$item2['img']}\" width='80' height='80' style=\"border: 1px solid #CC9900\"></center>"; echo "<center><a href=\"../description.php?id={$item['id']}\">{$item2['name']}</a></center>"; echo "<center>[<a href='../item.php?sell=".$item['id']."'>Sell</a>] [<a href='../item.php?market=".$item['id']."'>Market</a>] <br>[<a href='../item.php?send=".$item['id']."'>Send</a>] [<a href='../item.php?use=".$item['id']."'>Use</a>]</center><br>"; echo "</td>\n"; //Close row if last column if($current_col==$max_col) { echo "<tr>\n"; $current_col = 0; //<---Changed } $current_col++; } } //Close last row if needed if ($current_col!=1) { for(; $current_col<=$max_col; $current_col++) { echo "<td> </td>\n"; } } ?> </table> </div></div> <div class="g_content"><h3> Rares</h3><div class="g_text"> <table align='center' cellspacing='10'> <?php $current_col = 1; $max_col = 4; $query = $db->execute("select * from items where `player_id`=?", array($player->id)); while($item = $query->fetchrow()) { $query2 = $db->execute("select * from `blueprint_items` where `id`=?",array($item['item_id'])); $item2 = $query2->fetchrow(); if($item2['type'] == 'rare'){ //Open new row if first column if($current_col==1) { echo "<tr>\n"; } //Display current record echo "<td>"; echo "<center><img src=\"{$item2['img']}\" width='80' height='80' style=\"border: 1px solid #CC9900\"></center>"; echo "<center><a href=\"../description.php?id={$item['id']}\">{$item2['name']}</a></center>"; echo "<center>[<a href='../item.php?sell=".$item['id']."'>Sell</a>] [<a href='../item.php?market=".$item['id']."'>Market</a>] <br>[<a href='../item.php?send=".$item['id']."'>Send</a>] [<a href='../item.php?use=".$item['id']."'>Use</a>]</center><br>"; echo "</td>\n"; //Close row if last column if($current_col==$max_col) { echo "<tr>\n"; $current_col = 0; //<---Changed } $current_col++; } } //Close last row if needed if ($current_col!=1) { for(; $current_col<=$max_col; $current_col++) { echo "<td> </td>\n"; } } ?> </table> </div></div> <div class="g_content"><h3> Parts</h3><div class="g_text"> <table align='center' cellspacing='10'> <?php $current_col = 1; $max_col = 4; $query = $db->execute("select * from items where `player_id`=?", array($player->id)); while($item = $query->fetchrow()) { $query2 = $db->execute("select * from `blueprint_items` where `id`=?",array($item['item_id'])); $item2 = $query2->fetchrow(); if($item2['type'] == 'parts'){ //Open new row if first column if($current_col==1) { echo "<tr>\n"; } //Display current record echo "<td>"; echo "<center><img src=\"{$item2['img']}\" width='80' height='80' style=\"border: 1px solid #CC9900\"></center>"; echo "<center><a href=\"../description.php?id={$item2['id']}\">{$item2['name']}</a></center>"; echo "<center>[<a href='../item.php?sell=".$item['id']."'>Sell</a>] [<a href='../item.php?market=".$item['id']."'>Market</a>] <br>[<a href='../item.php?send=".$item['id']."'>Send</a>] [<a href='../item.php?use=".$item['id']."'>Use</a>]</center><br>"; echo "</td>\n"; //Close row if last column if($current_col==$max_col) { echo "<tr>\n"; $current_col = 0; //<---Changed } $current_col++; } } //Close last row if needed if ($current_col!=1) { for(; $current_col<=$max_col; $current_col++) { echo "<td> </td>\n"; } } ?> </table> </div></div> <div class="g_content"><h3> Others</h3><div class="g_text"> <table align='center' cellspacing='10'> <?php $current_col = 1; $max_col = 4; $query = $db->execute("select * from items where `player_id`=?", array($player->id)); while($item = $query->fetchrow()) { $query2 = $db->execute("select * from `blueprint_items` where `id`=?",array($item['item_id'])); $item2 = $query2->fetchrow(); if($item2['type'] == 'other'){ //Open new row if first column if($current_col==1) { echo "<tr>\n"; } //Display current record echo "<td>"; echo "<center><img src=\"{$item2['img']}\" width='80' height='80' style=\"border: 1px solid #CC9900\"></center>"; echo "<center><a href=\"../description.php?id={$item2['id']}\">{$item2['name']}</a></center>"; echo "<center>[<a href='../item.php?sell=".$item['id']."'>Sell</a>] [<a href='../item.php?market=".$item['id']."'>Market</a>] <br>[<a href='../item.php?send=".$item['id']."'>Send</a>] [<a href='../item.php?use=".$item['id']."'>Use</a>]</center><br>"; echo "</td>\n"; //Close row if last column if($current_col==$max_col) { echo "<tr>\n"; $current_col = 0; //<---Changed } $current_col++; } } //Close last row if needed if ($current_col!=1) { for(; $current_col<=$max_col; $current_col++) { echo "<td> </td>\n"; } } ?> </table></div></div> </div> Link to comment https://forums.phpfreaks.com/topic/180502-getting-values-from-3-tables-then-echoing-without-showing-dupes/ Share on other sites More sharing options...
seany123 Posted November 7, 2009 Author Share Posted November 7, 2009 ANYONE able to help me out at all here? Link to comment https://forums.phpfreaks.com/topic/180502-getting-values-from-3-tables-then-echoing-without-showing-dupes/#findComment-952934 Share on other sites More sharing options...
seany123 Posted November 8, 2009 Author Share Posted November 8, 2009 Bump. Link to comment https://forums.phpfreaks.com/topic/180502-getting-values-from-3-tables-then-echoing-without-showing-dupes/#findComment-953661 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.