spacepoet Posted March 1, 2011 Share Posted March 1, 2011 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 https://forums.phpfreaks.com/topic/229191-what-is-the-correct-sql-to-create-fields-for-images/ Share on other sites More sharing options...
fenway Posted March 1, 2011 Share Posted March 1, 2011 ALTER TABLE? I don't follow. Link to comment https://forums.phpfreaks.com/topic/229191-what-is-the-correct-sql-to-create-fields-for-images/#findComment-1181068 Share on other sites More sharing options...
Muddy_Funster Posted March 1, 2011 Share Posted March 1, 2011 I think they want to know about blobs but looking at the field types being used already I would recomend brushing up on basics before going any further. Link to comment https://forums.phpfreaks.com/topic/229191-what-is-the-correct-sql-to-create-fields-for-images/#findComment-1181178 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.