Jump to content

csv import?


ericsante

Recommended Posts

I have the following table

CREATE TABLE `tbltranslog` (
  `TransLog_ID` int(10) NOT NULL auto_increment,
  `SubID` int(5) NOT NULL,
  `Date` char(21) NOT NULL,
  `Amount` varchar(9) NOT NULL,
  `TransType` varchar(32) NOT NULL,
  `TransResult` varchar(10) NOT NULL,
  `AuthCode` varchar(15) NOT NULL,
  PRIMARY KEY  (`TransLog_ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;

and my CSV file contains the following fields:

"Sub ID","Transaction Date/Time","Amount","Consumer Name","Account Name","Transaction Type","Transaction Result","Authorization Code","Routing Number","Account Number","Account Type Description","Credit Card Number","Credit Card Expiration Date","Recurring Description","Company Name","Billing Address1","Billing Address2","Billing City","Billing State","Billing Zip","Billing Country","Shipping Address1","Shipping Address2","Shipping City","Shipping State","Shipping Zip","Shipping Country","Phone","E-Mail","Memo","Drivers License Number","Social Security Number","IP Address","Merchant Referrer Information","Merchant Order Number","Order Number","Comments","Transaction History Key","Referring Transaction History Key","Merchant Order Type","User ID","Authnet Auth Response","Authnet Auth Definition"


As you can see the CSV has more data then I want to keep, so the question is how do I ignore the fields that I do not want.

Link to comment
https://forums.phpfreaks.com/topic/29029-csv-import/
Share on other sites

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.