Marvin Cummings wrote:


Sorry for this easy question but I'm kind of a newbie and I'm wondering if
someone could assist me with creating a new table for a postnuke module? I
need to copy the following content into a table I create named 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 see where to create the table but I'm not sure about the number of fields
to add. My instincts are telling me I need 18 fields but I just need to
confirm.

17 would do, so long as you check the "primary" button on the first one (ad_id), but this would be much simpler to do with the mysql client. Connect with


mysql -u root -p nameofdb

replacing "nameofdb" with whatever you've named the database this table will belong to. After you've supplied the password and gotten in, enter

  CREATE TABLE nuke_zc_ads
  (
  `ad_id` smallint(5) unsigned NOT NULL auto_increment,
   .
   .
   .
  ) TYPE=MyISAM AUTO_INCREMENT=1 ;

In other words, copy what you have above and paste it in after entering the "CREATE TABLE" line. That's it -- you're done -- table created. You could do it with phpmyadmin, but it'll take awhile filling in all those boxes.

Any responses are appreciated.

Michael



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



Reply via email to