Jump to content

importing data into sql with phpadmin


datto510

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

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