Author Topic: Whats wrong with my query  (Read 421 times)

0 Members and 1 Guest are viewing this topic.

Offline herghostTopic starter

  • Devotee
  • Posts: 676
    • View Profile
Whats wrong with my query
« on: March 18, 2010, 12:58:57 PM »
Hi Guys
This:

Code: [Select]
-- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 18, 2010 at 04:44 PM
-- Server version: 5.1.36
-- PHP Version: 5.3.0

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `billing`
--

-- --------------------------------------------------------

--
-- Table structure for table `product_features`
--

CREATE TABLE IF NOT EXISTS `product_features` (
  `id` int(11) NOT NULL, AUTO_INCREMENT,
  `name` varchar(32) NOT NULL,
  `changemx` int(11) NOT NULL,
  `traceaddy` int(11) NOT NULL,
  `addoncgi` int(11) NOT NULL,
  `addondomains` int(11) NOT NULL,
  `zoneedit` int(11) NOT NULL,
  `advguest` int(11) NOT NULL,
  `agora` int(11) NOT NULL,
  `analog` int(11) NOT NULL,
  `handlers` int(11) NOT NULL,
  `autoresponders` int(11) NOT NULL,
  `awstats` int(11) NOT NULL,
  `backup` int(11) NOT NULL,
  `backupwizard` int(11) NOT NULL,
  `bandwidth` int(11) NOT NULL,
  `boxtrapper` int(11) NOT NULL,
  `cgi` int(11) NOT NULL,
  `csvimport` int(11) NOT NULL,
  `setlang` int(11) NOT NULL,
  `style` int(11) NOT NULL,
  `chat` int(11) NOT NULL,
  `statselect` int(11) NOT NULL,
  `counter` int(11) NOT NULL,
  `cron` int(11) NOT NULL,
  `errpgs` int(11) NOT NULL,
`defaultaddress` int(11) NOT NULL,
`dirselector` int(11) NOT NULL,
`diskusageviewer` int(11) NOT NULL,
`popaccts` int(11) NOT NULL,
`emailauth` int(11) NOT NULL,
`emaildomainfwd` int(11) NOT NULL,
`blockers` int(11) NOT NULL,
`emailscripts` int(11) NOT NULL,
`entropybanner` int(11) NOT NULL,
`entropysearch` int(11) NOT NULL,
`errlog` int(11) NOT NULL,
`fantastico` int(11) NOT NULL,
`Fantastico_De_Luxe` int(11) NOT NULL,
`filemanager` int(11) NOT NULL,
`forwarders` int(11) NOT NULL,
`frontpage` int(11) NOT NULL,
`ftpaccts` int(11) NOT NULL,
`ftpsetup` int(11) NOT NULL,
`getstart` int(11) NOT NULL,
`hotlink` int(11) NOT NULL,
`ipdeny` int(11) NOT NULL,
`ipdeny` int(11) NOT NULL,
`cpanelpro_images` int(11) NOT NULL,
`indexmanager` int(11) NOT NULL,
`modules-php-pear` int(11) NOT NULL,
`modules-perl` int(11) NOT NULL,
`modules-ruby` int(11) NOT NULL,
`interchange` int(11) NOT NULL,
`clock` int(11) NOT NULL,
`lastvisits` int(11) NOT NULL,
`cpanelpro_leechprotect` int(11) NOT NULL,
`lists` int(11) NOT NULL,
`mime` int(11) NOT NULL,
`mysql` int(11) NOT NULL,
`nettools` int(11) NOT NULL,
`pgp` int(11) NOT NULL,
`bbs` int(11) NOT NULL,
`parkeddomains` int(11) NOT NULL,
`password` int(11) NOT NULL,
`phpmyadmin` int(11) NOT NULL,
`phppgadmin` int(11) NOT NULL,
`postgres` int(11) NOT NULL,
`randhtml` int(11) NOT NULL,
`rawlog` int(11) NOT NULL,
`redirects` int(11) NOT NULL,
`ror` int(11) NOT NULL,
`ssh` int(11) NOT NULL,
`sslinstall` int(11) NOT NULL,
`sslmanager` int(11) NOT NULL,
`searchsubmit` int(11) NOT NULL,
`php-config` int(11) NOT NULL,
`serverstatus` int(11) NOT NULL,
`scgiwrap` int(11) NOT NULL,
`simplezoneedit` int(11) NOT NULL,
`guest` int(11) NOT NULL,
`spamassassin` int(11) NOT NULL,
`spambox` int(11) NOT NULL,
`statmanager` int(11) NOT NULL,
`subdomains` int(11) NOT NULL,
`subdomainstats` int(11) NOT NULL,
`cpanelpro_support` int(11) NOT NULL,
`updatecontact` int(11) NOT NULL,
`updatenotificationprefs` int(11) NOT NULL,
`videotut` int(11) NOT NULL,
`clamavconnector_scan` int(11) NOT NULL,
`webdisk` int(11) NOT NULL,
`webalizer` int(11) NOT NULL,
`webmail` int(11) NOT NULL,
`webprotect` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

Returns:

Code: [Select]
MySQL said:

#1064 - 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 '
  `name` varchar(32) NOT NULL,
  `changemx` int(11) NOT NULL,
  `traceaddy`' at line 9

What am I not seeing?

Offline Maq

  • Global Moderator
  • 'Insane!'
  • *
  • Posts: 11,004
  • Gender: Male
    • View Profile
    • Top Ecigs Reviews
Re: Whats wrong with my query
« Reply #1 on: March 18, 2010, 01:05:32 PM »
Quote
`id` int(11) NOT NULL, AUTO_INCREMENT,

Remove the comma after NOT NULL.
Electronic Cigarette Reviews - Smoking alternatives, find YOUR ecig!
ini_set ("display_errors""1");
error_reporting(E_ALL);

Offline herghostTopic starter

  • Devotee
  • Posts: 676
    • View Profile
Re: Whats wrong with my query
« Reply #2 on: March 18, 2010, 01:27:57 PM »
Thanks,

Stuck on another error now!
Code: [Select]
-- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 18, 2010 at 04:44 PM
-- Server version: 5.1.36
-- PHP Version: 5.3.0

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `billing`
--

-- --------------------------------------------------------

--
-- Table structure for table `product_features`
--

CREATE TABLE IF NOT EXISTS `product_features` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) NOT NULL,
  `changemx` int(11) NOT NULL,
  `traceaddy` int(11) NOT NULL,
  `addoncgi` int(11) NOT NULL,
  `addondomains` int(11) NOT NULL,
  `zoneedit` int(11) NOT NULL,
  `advguest` int(11) NOT NULL,
  `agora` int(11) NOT NULL,
  `analog` int(11) NOT NULL,
  `handlers` int(11) NOT NULL,
  `autoresponders` int(11) NOT NULL,
  `awstats` int(11) NOT NULL,
  `backup` int(11) NOT NULL,
  `backupwizard` int(11) NOT NULL,
  `bandwidth` int(11) NOT NULL,
  `boxtrapper` int(11) NOT NULL,
  `cgi` int(11) NOT NULL,
  `csvimport` int(11) NOT NULL,
  `setlang` int(11) NOT NULL,
  `style` int(11) NOT NULL,
  `chat` int(11) NOT NULL,
  `statselect` int(11) NOT NULL,
  `counter` int(11) NOT NULL,
  `cron` int(11) NOT NULL,
  `errpgs` int(11) NOT NULL,
`defaultaddress` int(11) NOT NULL,
`dirselector` int(11) NOT NULL,
`diskusageviewer` int(11) NOT NULL,
`popaccts` int(11) NOT NULL,
`emailauth` int(11) NOT NULL,
`emaildomainfwd` int(11) NOT NULL,
`blockers` int(11) NOT NULL,
`emailscripts` int(11) NOT NULL,
`entropybanner` int(11) NOT NULL,
`entropysearch` int(11) NOT NULL,
`errlog` int(11) NOT NULL,
`fantastico` int(11) NOT NULL,
`Fantastico_De_Luxe` int(11) NOT NULL,
`filemanager` int(11) NOT NULL,
`forwarders` int(11) NOT NULL,
`frontpage` int(11) NOT NULL,
`ftpaccts` int(11) NOT NULL,
`ftpsetup` int(11) NOT NULL,
`getstart` int(11) NOT NULL,
`hotlink` int(11) NOT NULL,
`ipdeny` int(11) NOT NULL,
`cpanelpro_images` int(11) NOT NULL,
`indexmanager` int(11) NOT NULL,
`modules-php-pear` int(11) NOT NULL,
`modules-perl` int(11) NOT NULL,
`modules-ruby` int(11) NOT NULL,
`interchange` int(11) NOT NULL,
`clock` int(11) NOT NULL,
`lastvisits` int(11) NOT NULL,
`cpanelpro_leechprotect` int(11) NOT NULL,
`lists` int(11) NOT NULL,
`mime` int(11) NOT NULL,
`mysql` int(11) NOT NULL,
`nettools` int(11) NOT NULL,
`pgp` int(11) NOT NULL,
`bbs` int(11) NOT NULL,
`parkeddomains` int(11) NOT NULL,
`password` int(11) NOT NULL,
`phpmyadmin` int(11) NOT NULL,
`phppgadmin` int(11) NOT NULL,
`postgres` int(11) NOT NULL,
`randhtml` int(11) NOT NULL,
`rawlog` int(11) NOT NULL,
`redirects` int(11) NOT NULL,
`ror` int(11) NOT NULL,
`ssh` int(11) NOT NULL,
`sslinstall` int(11) NOT NULL,
`sslmanager` int(11) NOT NULL,
`searchsubmit` int(11) NOT NULL,
`php-config` int(11) NOT NULL,
`serverstatus` int(11) NOT NULL,
`scgiwrap` int(11) NOT NULL,
`simplezoneedit` int(11) NOT NULL,
`guest` int(11) NOT NULL,
`spamassassin` int(11) NOT NULL,
`spambox` int(11) NOT NULL,
`statmanager` int(11) NOT NULL,
`subdomains` int(11) NOT NULL,
`subdomainstats` int(11) NOT NULL,
`cpanelpro_support` int(11) NOT NULL,
`updatecontact` int(11) NOT NULL,
`updatenotificationprefs` int(11) NOT NULL,
`videotut` int(11) NOT NULL,
`clamavconnector_scan` int(11) NOT NULL,
`webdisk` int(11) NOT NULL,
`webalizer` int(11) NOT NULL,
`webmail` int(11) NOT NULL,
`webprotect` int(11) NOT NULL
PRIMARY KEY (`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

Reports
Code: [Select]
MySQL said:

#1064 - 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 '(`id`)
)
ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1' at line 103


Offline herghostTopic starter

  • Devotee
  • Posts: 676
    • View Profile
Re: Whats wrong with my query
« Reply #3 on: March 18, 2010, 01:29:34 PM »
Got it! Added the missing comma

Offline Maq

  • Global Moderator
  • 'Insane!'
  • *
  • Posts: 11,004
  • Gender: Male
    • View Profile
    • Top Ecigs Reviews
Re: Whats wrong with my query
« Reply #4 on: March 18, 2010, 03:33:59 PM »
Got it! Added the missing comma

You seem to suffer from a mild case of comma sickness.
Electronic Cigarette Reviews - Smoking alternatives, find YOUR ecig!
ini_set ("display_errors""1");
error_reporting(E_ALL);