x1nick Posted February 10, 2011 Share Posted February 10, 2011 I have mysql exported in the following sql format: - CREATE TABLE IF NOT EXISTS `pma_history` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '', `timevalue` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `sqlquery` text COLLATE utf8_bin NOT NULL, PRIMARY KEY (`id`), KEY `username` (`username`,`db`,`table`,`timevalue`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='SQL history for phpMyAdmin' AUTO_INCREMENT=3761 ; -- -- Dumping data for table `pma_history` -- INSERT INTO `pma_history` (`id`, `username`, `db`, `table`, `timevalue`, `sqlquery`) VALUES (2, 'root', 'information_schema', 'FILES', '2010-03-04 19:26:33', 'SELECT * FROM `FILES`') Just as an example anyway. What I need to be able to do, is import this using PHP. Does anyone know of a suitable class for doing this? I could make my own, but I cant quite work out the best way to seperate the queries out? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/227271-mysql-import-using-php/ Share on other sites More sharing options...
Maq Posted February 10, 2011 Share Posted February 10, 2011 Please do not double post. I'll assume it was an honest mistake because they were only apart by a few seconds. Quote Link to comment https://forums.phpfreaks.com/topic/227271-mysql-import-using-php/#findComment-1172365 Share on other sites More sharing options...
x1nick Posted February 14, 2011 Author Share Posted February 14, 2011 Sorry, my browser crashed so that may have caused it. Quote Link to comment https://forums.phpfreaks.com/topic/227271-mysql-import-using-php/#findComment-1174148 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.