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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.