I can not get my site to connect to its database properly, I have narrowed it down to two files (attached) and I do not know what is wrong with them. I think it is the files, I have looked over the db a few times and it seems fine. I have also provided a copy of the SQL if someone want to look it over. Can someone please help me? You can see the error yourself HERE.
maddogsprofiles 0 Light Poster
The attachment preview is chopped off after the first 10 KB. Please download the entire file.
-- phpMyAdmin SQL Dump
-- version 2.11.9.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 30, 2008 at 01:34 PM
-- Server version: 5.0.67
-- PHP Version: 5.2.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `fbzonein_fightclub`
--
-- --------------------------------------------------------
--
-- Table structure for table `cu_arms_dealer_list`
--
CREATE TABLE IF NOT EXISTS `cu_arms_dealer_list` (
`armsid` int(10) NOT NULL auto_increment,
`armsimage` text,
`armstitle` text,
`armsprice` int(10) NOT NULL default '0',
`armsstatus` int(10) default NULL,
`armsamount` int(10) default NULL,
PRIMARY KEY (`armsid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=25 ;
--
-- Dumping data for table `cu_arms_dealer_list`
--
INSERT INTO `cu_arms_dealer_list` (`armsid`, `armsimage`, `armstitle`, `armsprice`, `armsstatus`, `armsamount`) VALUES
(1, 'baseball.jpg', 'Baseball', 100, 1, 10),
(2, 'crowbar.jpg', 'Crowbar', 180, 1, 50),
(3, 'blue_crowbar.jpg', 'Blue Crowbar', 250, 1, 20),
(4, 'bush_knife.jpg', 'Bush Knife', 220, 1, 30),
(5, 'knife.jpg', 'Knife', 140, 1, 200),
(6, 'gerber_knife.jpg', 'Gerber Knife', 300, 1, 20),
(7, 'dagger.jpg', 'Dagger', 250, 1, 200),
(8, 'mini_dagger.jpg', 'Mini Dagger', 200, 1, 30),
(9, 'chinese_axe.jpg', 'Chinese Axe', 400, 1, 50),
(10, 'gun.jpg', 'Gun', 500, 1, 300),
(11, 'pistol.jpg', 'Pistol', 600, 1, 400),
(12, 'revolver.jpg', 'Revolver', 800, 1, 300),
(13, 'HFC132S_silver_revolver.jpg', 'HFC132S Silver Revolver', 1200, 1, 200),
(14, '1000_watt_power_hair_gun.jpg', '1000 Watt Power Hair Gun', 10000, 1, 10),
(15, 'golden_gun.jpg', 'Golden Gun', 30000, 1, 5),
(16, 'pump_action_shotgun.jpg', 'Pump Action Shotgun', 2500, 1, 40),
(17, 'M96_rifle.jpg', 'M96 Rifle', 6000, 1, 30),
(18, 'sniper_rifle.jpg', 'Sniper Rifle', 8000, 1, 10),
(19, 'high_power_sniper_rifle.jpg', 'High Power Sniper Rifle', 12000, 1, 10),
(20, 'SMG.jpg', 'SMG', 4000, 1, 300),
(21, 'sub_machine_gun.jpg', 'Sub Machine Gun', 7000, 1, 200),
(22, 'stormtrooper_blaster_rifle.jpg', 'Stormtrooper Blaster Rifle', 14000, 1, 100),
(23, 'M1_rifle.jpg', 'M1 Rifle', 2000, 1, 30);
-- --------------------------------------------------------
--
-- Table structure for table `cu_arms_log`
--
CREATE TABLE IF NOT EXISTS `cu_arms_log` (
`lid` int(10) NOT NULL auto_increment,
`userid` int(10) default NULL,
`armsid` int(10) default NULL,
`quantity` int(10) default NULL,
PRIMARY KEY (`lid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=109 ;
--
-- Dumping data for table `cu_arms_log`
--
INSERT INTO `cu_arms_log` (`lid`, `userid`, `armsid`, `quantity`) VALUES
(67, 1332618024, 2, 2),
(68, 1039733971, 2, 1),
(69, 1088582907, 2, 1),
(70, 1088582907, 10, 1),
(71, 510602810, 2, 1),
(72, 523774272, 4, 1),
(73, 528875038, 1, 1),
(74, 1017708810, 2, 1),
(75, 1017708810, 1, 1),
(76, 1017708810, 13, 1),
(77, 1017708810, 20, 1),
(78, 873630003, 10, 1),
(79, 706528224, 10, 1),
(80, 510602810, 21, 1),
(81, 504928686, 1, 1),
(82, 1070680204, 10, 3),
(83, 1070680204, 23, 1),
(84, 597753470, 2, 1),
(85, 597753470, 10, 1),
(86, 597753470, 11, 1),
(87, 597753470, 23, 1),
(88, 597753470, 3, 1),
(89, 597753470, 17, 1),
(90, 1371585953, 10, 2),
(91, 1658450975, 1, 2),
(92, 1658450975, 2, 1),
(93, 1332618024, 3, 1),
(94, 1332618024, 12, 1),
(95, 1332618024, 10, 1),
(96, 1332618024, 18, 1),
(97, 1371585953, 12, 1),
(98, 1371585953, 2, 1),
(99, 1371585953, 3, 1),
(100, 1371585953, 11, 1),
(101, 1371585953, 23, 1),
(102, 1371585953, 17, 1),
(103, 573805554, 11, 1),
(104, 573805554, 8, 1),
(105, 573805554, 16, 1),
(106, 573805554, 10, 1),
(107, 1371585953, 6, 1),
(108, 1371585953, 18, 1);
-- --------------------------------------------------------
--
-- Table structure for table `cu_assest_category`
--
CREATE TABLE IF NOT EXISTS `cu_assest_category` (
`cid` int(10) NOT NULL auto_increment,
`cat_title` text,
PRIMARY KEY (`cid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
--
-- Dumping data for table `cu_assest_category`
--
INSERT INTO `cu_assest_category` (`cid`, `cat_title`) VALUES
(1, 'Villa'),
(2, 'Restaurant'),
(3, 'Apartment'),
(4, 'Hotel'),
(5, 'Office'),
(6, 'Casino');
-- --------------------------------------------------------
--
-- Table structure for table `cu_assest_list`
--
CREATE TABLE IF NOT EXISTS `cu_assest_list` (
`aid` int(10) NOT NULL auto_increment,
`catid` int(10) default NULL,
`aimage` text,
`atitle` text,
`aprice` int(10) NOT NULL default '0',
`aincome` int(10) NOT NULL default '0',
PRIMARY KEY (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=26 ;
--
-- Dumping data for table `cu_assest_list`
--
INSERT INTO `cu_assest_list` (`aid`, `catid`, `aimage`, `atitle`, `aprice`, `aincome`) VALUES
(1, 1, 'dalmatia_villa.jpg', 'Dalmatia', 15000, 400),
(2, 1, 'orlando_villa.jpg', 'Orlando Villa', 18000, 600),
(3, 1, 'beach_villa.jpg', 'Beach Villa', 24000, 900),
(4, 1, 'dubai_villa.jpg', 'Dubai Villa', 30000, 1200),
(5, 2, 'westminster_restaurant.jpg', 'Westminster Restaurant', 36000, 800),
(6, 2, 'botown_restaurant.jpg', 'Botown Restaurant', 45000, 1100),
(7, 2, 'chinese_restaurant.jpg', 'Chinese Restaurant', 48000, 1400),
(8, 2, 'centerpoint_restaurant.jpg', 'Centerpoint Restaurant', 52000, 1800),
(9, 3, 'astoria_apartment.jpg', 'Astoria Apartment', 150000, 6000),
(10, 3, 'co-op_apartment.jpg', 'CO-OP Apartment', 160000, 6500),
(11, 3, 'pripyat_apartment.jpg', 'Pripyat Apartment', 220000, 8000),
(12, 3, 'oldtown_apartment.jpg', 'Oldtown Apartment', 240000, 9000),
(13, 3, 'garden_apartment_complex.jpg', 'Garden Apartment Complex', 300000, 15000),
(14, 4, 'beaconsfield_hotel.jpg', 'Beaconsfield Hotel', 400000, 12000),
(15, 4, 'resort_hotel.jpg', 'Resort Hotel', 440000, 14000),
(16, 4, 'bellagio_hotel.jpg', 'Bellagio Hotel', 520000, 22000),
(17, 4, 'modern_hotel.jpg', 'Modern Hotel', 640000, 35000),
(18, 5, 'phenolchemie_office.jpg', 'Phenolchemie office', 12000000, 150000),
(19, 5, 'akasaka_office.jpg', 'Akasaka Office', 14000000, 180000),
(20, 5, 'tocho_office.jpg', 'Tocho Office', 18000000, 220000),
(21, 5, 'zero_energy_office.jpg', 'Zero Energy Office', 24000000, 280000),
(22, 6, 'famous_casino.jpg', 'Famous Casino', 30000000, 320000),
(23, 6, 'wrest_point_casino.jpg', 'Wrest Point Casino', 40000000, 550000),
(24, 6, 'legendary_casino.jpg', 'legendary_casino', 60000000, 900000);
-- --------------------------------------------------------
--
-- Table structure for table `cu_assest_log`
--
CREATE TABLE IF NOT EXISTS `cu_assest_log` (
`lid` int(10) NOT NULL auto_increment,
`userid` text,
`aid` int(10) default NULL,
`quantity` int(10) default NULL,
PRIMARY KEY (`lid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ;
--
-- Dumping data for table `cu_assest_log`
--
-- --------------------------------------------------------
--
-- Table structure for table `cu_bank`
--
CREATE TABLE IF NOT EXISTS `cu_bank` (
`bid` int(10) NOT NULL auto_increment,
`userid` int(10) default NULL,
`bamount` int(10) NOT NULL default '0',
PRIMARY KEY (`bid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
--
-- Dumping data for table `cu_bank`
--
INSERT INTO `cu_bank` (`bid`, `userid`, `bamount`) VALUES
(4, 1039733971, 9000),
(5, 1371585953, 45000);
-- --------------------------------------------------------
--
-- Table structure for table `cu_cars_dealer_list`
--
CREATE TABLE IF NOT EXISTS `cu_cars_dealer_list` (
`carsid` int(10) NOT NULL auto_increment,
`carsimage` text,
`carstitle` text,
`carsprice` int(10) NOT NULL default '0',
`carsstatus` int(10) default NULL,
`carsamount` int(10) default NULL,
PRIMARY KEY (`carsid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;
--
-- Dumping data for table `cu_cars_dealer_list`
--
INSERT INTO `cu_cars_dealer_list` (`carsid`, `carsimage`, `carstitle`, `carsprice`, `carsstatus`, `carsamount`) VALUES
(1, 'ford_crown_victoria.jpg', 'Ford', 27000, 1, 160),
(2, 'toyota_FT-HS_hybrid.jpg', 'Toyota FT-HS Hybrid', 43000, 1, 20),
(3, 'nissan_GTR_proto.jpg', 'Nissan GTR Proto', 44000, 1, 35),
(4, 'mercedes_W220.jpg', 'Mercedes W220', 68000, 1, 40),
(5, 'BMW_7_series.jpg', 'BMW 7 Series', 75000, 1, 120),
(6, 'toyota_land_cruiser_prado.jpg', 'Toyota Land Cruiser Prado', 78000, 1, 350),
(7, 'armored_ford_excursion.jpg', 'Armored Ford Excursion', 56000, 1, 140),
(8, 'armoured_range_rover.jpg', 'Armoured Range Rover', 72000, 1, 160);
-- --------------------------------------------------------
--
-- Table structure for table `cu_cars_log`
--
CREATE TABLE IF NOT EXISTS `cu_cars_log` (
`lid` int(10) NOT NULL auto_increment,
`userid` int(10) default NULL,
`carsid` int(10) default NULL,
`quantity` int(10) default NULL,
PRIMARY KEY (`lid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
--
-- Dumping data for table `cu_cars_log`
--
INSERT INTO `cu_cars_log` (`lid`, `userid`, `carsid`, `quantity`) VALUES
(4, 1371585953, 8, 1);
-- --------------------------------------------------------
--
-- Table structure for table `cu_drug_dealer_list`
--
CREATE TABLE IF NOT EXISTS `cu_drug_dealer_list` (
`drugid` int(10) NOT NULL auto_increment,
`drugimage` text,
`drugtitle` text,
`drugprice` int(10) NOT NULL default '0',
`drugenergy` int(10) default NULL,
`drugsamount` int(10) default NULL,
PRIMARY KEY (`drugid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;
--
-- Dumping data for table `cu_drug_dealer_list`
--
INSERT INTO `cu_drug_dealer_list` (`drugid`, `drugimage`, `drugtitle`, `drugprice`, `drugenergy`, `drugsamount`) VALUES
(1, 'mixed_vitamin.jpg', 'Mixed Vitamin', 20, 1, 140),
(2, 'compound_vitamin.jpg', 'Compount Vitamin', 50, 3, 1600),
(3, 'duff-energy-drink.jpg', 'Duff Energy Drink', 150, 5, 400),
(4, 'freehemp_energy_drink.jpg', 'Freehemp Energy Drink', 180, 7, 400),
(5, 'boom_boom_energy_drink.jpg', 'Boom Boom', 520, 10, 60
itisnot_me 0 Posting Whiz in Training
nvalid query -- SELECT * FROM `cu_users` WHERE `userid` = -- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
it seems that you don't have the right syntax
"SELECT * FROM `cu_users` WHERE `userid` = $u"
should be
"SELECT * FROM cu_users WHERE userid = $u"
maddogsprofiles 0 Light Poster
Thanks, this fixed the first problem. Unfortunately it looks like I have some more, it now says,
Parse error: syntax error, unexpected T_LIST in /home/maddscom/ourhangoutspace.com/gw/includes/userinc.php on line 14
Anyone want to look through the files I provided to see if they can find the errors? I would really appreciate it!
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.