Hi, the table name and the column names dont have to be inclosed by ' '.


Carlos

----Original Message Follows----
From: "Marvin Cummings" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Need help creating table...
Date: Tue, 6 Apr 2004 12:29:48 -0400





_____

From: Marvin Cummings [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 9:26 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Need help creating table...



I attempt to create this table from the command line and get the following
error:

Error 1064 (42000): You have an error in your SQL syntax. Check the manual
that corresponds to your MySQL version for the right syntax to use near
''ad_id' smallint(5) unsigned NOT NULL auto_increment, 'cat_id' smallint(5)
unsign' at line 3

CREATE TABLE 'nuke_zc_ads'

(
`ad_id` smallint(5) unsigned NOT NULL auto_increment,
`cat_id` smallint(5) unsigned NOT NULL default '0',
`user_name` varchar(20) NOT NULL default '',
`email` varchar(50) NOT NULL default '',
`price` text NOT NULL,
`condition` varchar(10) NOT NULL default '',
`city` varchar(20) NOT NULL default '',
`state` varchar(20) NOT NULL default '',
`country` varchar(20) NOT NULL default '',
`lastup_date` int(11) NOT NULL default '0',
`subject` text NOT NULL,
`descript` text NOT NULL,
`url` text NOT NULL,
`views` int(11) NOT NULL default '0',
`paypal` char(3) NOT NULL default 'No',
`add_date` int(11) NOT NULL default '0',
`exp_date` int(11) NOT NULL default '0',
PRIMARY KEY (`ad_id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;



I'm typing this exactly as it appears but it's not working. I also try to
create this table in phpMyAdmin but have a question:

Field Type

ad_id SmallInt 5



Length/Values

5



Charset

Latin1



Attributes

unsigned



Null

Not_null



Default**

?????



Extra

auto_increment



I'm not sure what to enter for Default**. Can someone tell me what I'm
missing?

I'm using MySQL5.0alpha w/PHP4.3.4 on W2K3.



Thanks

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to