Jump to content

What is the correct SQL to create fields for images ??


spacepoet

Recommended Posts

Hello:

 

I have this bit of code to create a new table:

CREATE TABLE `stores` (
  `zip_id` INT(11) NOT NULL,
  `store_id` INT(11) unsigned NOT NULL AUTO_INCREMENT,
  `store_name` VARCHAR(50) NOT NULL,
  `address` VARCHAR(50) NOT NULL,
  `city` VARCHAR(25) NOT NULL,
  `full_state` VARCHAR(50) NOT NULL,
  `abbr_state` VARCHAR(50) NOT NULL,
  `zip` VARCHAR(5) NOT NULL,
  `phone` VARCHAR(20) DEFAULT NULL,
  `hours` VARCHAR(100) DEFAULT NULL,
  `islistingactive` VARCHAR(25) NOT NULL,
  `fulllisting` VARCHAR(25) NOT NULL,
  PRIMARY KEY  (`store_id`),
  KEY `zip` (`zip`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

/*Data for the table `stores` */

INSERT INTO `stores`(`zip_id`,`store_id`,`store_name`,`address`,`city`,`full_state`,`abbr_state`,`zip`,`phone`,`hours`,`islistingactive`,`fulllisting`) VALUES
(7768, 1,'Main Shop','123 Church Street.','Malvern','Pennsylvania','PA','19355','(212) 992-3399','Mon-Fri: 9-5, Sat: 8-6, Sun: Closed','Yes','Yes'),
(7768, 2,'Ms Place','48 South Street.','Malvern','Pennsylvania','PA','19355','(212) 992-3399','Mon-Fri: 9-5, Sat: 8-6, Sun: Closed','Yes','Yes');

 

I want to also add 3 - 6 fields to allow a user to uploaded photos of each restaurant.

 

What is the correct snytax/SQL to add to allow this?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.