datto510 Posted April 27, 2009 Share Posted April 27, 2009 I am trying to import some data into a sql database. I am using the following sql to make the table eg the following script will make a new table. CREATE TABLE IF NOT EXISTS `est_costcenters` ( `est_ccorder` int(11) NOT NULL auto_increment, `est_cccode` varchar(100) NOT NULL default '', `est_ccname` varchar(100) default '', `est_ccgl` varchar(100) default '', `est_ccgroup` varchar(100) default '', `est_ccsecret` varchar(100) default '', PRIMARY KEY (`est_ccorder`) ) TYPE=MyISAM; but not sure how to fill it with required info. (of which there is a a lot) "ccorder" "cccode" "ccname" "ccgl" "ccgroup" "ccsecret" 1 1000 preliminaries 1.1 prelims 1 2 2000 site survey 1.1 prelims 1 3 3000 drafting 1.1 prelims 1 20 20000 excavation 1.1 slab stage 1 50 50000 roofing 1.1 enclosed 1 Link to comment https://forums.phpfreaks.com/topic/155770-importing-data-into-sql-with-phpadmin/ Share on other sites More sharing options...
fenway Posted April 27, 2009 Share Posted April 27, 2009 "required info"? what is that? Link to comment https://forums.phpfreaks.com/topic/155770-importing-data-into-sql-with-phpadmin/#findComment-819982 Share on other sites More sharing options...
datto510 Posted April 27, 2009 Author Share Posted April 27, 2009 oh sorry i meant that here is an example of the sort of data / info that need to import. (tab separated) "ccorder" "cccode" "ccname" "ccgl" "ccgroup" "ccsecret" 1 1000 preliminaries 1.1 prelims 1 2 2000 site survey 1.1 prelims 1 3 3000 drafting 1.1 prelims 1 20 20000 excavation 1.1 slab stage 1 50 50000 roofing 1.1 enclosed 1 Link to comment https://forums.phpfreaks.com/topic/155770-importing-data-into-sql-with-phpadmin/#findComment-819984 Share on other sites More sharing options...
fenway Posted April 28, 2009 Share Posted April 28, 2009 Look at LOAD DATA INFILE... you can specify tab-separated. Link to comment https://forums.phpfreaks.com/topic/155770-importing-data-into-sql-with-phpadmin/#findComment-821220 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.