thara Posted July 16, 2012 Share Posted July 16, 2012 Can anybody describe this mysql query. These are created by my web sever when I click database backup button on my web server. -- -- Table structure for table `category_subject` -- DROP TABLE IF EXISTS `category_subject`; CREATE TABLE `category_subject` ( `cs_id` int(4) unsigned NOT NULL auto_increment, `category_id` int(2) unsigned NOT NULL, `subject_id` int(4) unsigned NOT NULL, PRIMARY KEY (`cs_id`) ) ENGINE=MyISAM AUTO_INCREMENT=101 DEFAULT CHARSET=latin1; -- -- Dumping data for table `category_subject` -- LOCK TABLES `category_subject` WRITE; /*!40000 ALTER TABLE `category_subject` DISABLE KEYS */; INSERT INTO `category_subject` VALUES (1,2,1),(2,2,2),(3,2,3),(4,2,4),(5,2,5),(6,3,1),(7,3,2),(8,3,3),(9,3,4),(10,3,5),(11,4,6),(12,4,7),(13,4,,(14,4,9),(15,4,10),(16,4,11),(17,4,12),(18,4,13),(19,4,14),(20,4,15),(21,4,16); /*!40000 ALTER TABLE `category_subject` ENABLE KEYS */; UNLOCK TABLES; When I created my database I only add this query only.. # ----------------------- # Category_subject Table # ----------------------- CREATE TABLE category_subject( cs_id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT, category_id INT(2) UNSIGNED NOT NULL, subject_id INT(4) UNSIGNED NOT NULL, PRIMARY KEY (cs_id) ) ENGINE=MyISAM; others have created by web server. any comments are greatly appreciated. thank You.. Quote Link to comment https://forums.phpfreaks.com/topic/265753-auto-generated-mysql/ Share on other sites More sharing options...
scootstah Posted July 16, 2012 Share Posted July 16, 2012 I don't know what you are asking. The query above creates a table and then inserts data to it. Quote Link to comment https://forums.phpfreaks.com/topic/265753-auto-generated-mysql/#findComment-1361870 Share on other sites More sharing options...
thara Posted July 16, 2012 Author Share Posted July 16, 2012 I would like to know these mysql command doing what... DROP TABLE IF EXISTS `category_subject`; ENGINE=MyISAM AUTO_INCREMENT=101 DEFAULT CHARSET=latin1; LOCK TABLES `category_subject` WRITE; /*!40000 ALTER TABLE `category_subject` DISABLE KEYS */; /*!40000 ALTER TABLE `category_subject` ENABLE KEYS */; UNLOCK TABLES; Quote Link to comment https://forums.phpfreaks.com/topic/265753-auto-generated-mysql/#findComment-1361873 Share on other sites More sharing options...
scootstah Posted July 16, 2012 Share Posted July 16, 2012 So what's wrong with Googling it? This took about 30 seconds: DROP TABLE IF EXISTS ENGINE=MyISAM AUTO_INCREMENT LOCK & UNLOCK Quote Link to comment https://forums.phpfreaks.com/topic/265753-auto-generated-mysql/#findComment-1361875 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.