Not insertiing the data from csv file to Datebase - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Not insertiing the data from csv file to Datebase (/showthread.php?tid=49504) |
Not insertiing the data from csv file to Datebase - El Forum - 02-22-2012 [eluser]Ram_Kalva[/eluser] hi there can please any one can help to insert the data in database through a csv file i am attaching the required files to the message if any one please help i am updating this i need to run the function process_transaction_nbc_csv() which u can see maintenance file and please help me what other files need to upload the csv direct in to one database if any more files need please let me please help me this urgent for my project so pleaseeeee this is my table structure please help me if any one can CREATE TABLE IF NOT EXISTS `nbc_upload` ( `member_seq` int(11) NOT NULL, `nbc_deposit_date` date NOT NULL, `nbc_mra_policyno` int(50) NOT NULL, `nbc_membercode` int(50) NOT NULL, `nbc_idno` int(50) NOT NULL, `mem_contribution` int(20) NOT NULL, `emp_contribution` int(20) NOT NULL, `fiscal_date` date NOT NULL, `nbc_total_amount` int(11) NOT NULL, `nbc_FC` int(11) NOT NULL, `nbc_GL` int(11) NOT NULL, `nbc_RI` int(11) NOT NULL, `nbc_ref_id` int(11) NOT NULL, KEY `nbc_idno` (`nbc_idno`), KEY `member_seq` (`member_seq`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Not insertiing the data from csv file to Datebase - El Forum - 02-22-2012 [eluser]meigwilym[/eluser] You'll need to upload the file and save it. Then open it for reading. Read from the file a line at a time. Parse the lines so that you get your field values. Build up and execute your SQL query. Mei Not insertiing the data from csv file to Datebase - El Forum - 02-22-2012 [eluser]Ram_Kalva[/eluser] hi have done everything but still i am able to insert the correct fields in to the database i am not able to do that Not insertiing the data from csv file to Datebase - El Forum - 02-23-2012 [eluser]aquary[/eluser] How could we help if we don't know in detail about your code and errors. Since we are not sitting/standing behind you, please post necessary code for us to know more. Not insertiing the data from csv file to Datebase - El Forum - 02-23-2012 [eluser]InsiteFX[/eluser] Wait I found my Crystal Ball maybe I can help you now LOL Not insertiing the data from csv file to Datebase - El Forum - 02-23-2012 [eluser]aquary[/eluser] No, you took a wrong one. That is Dragon Ball. We have to wait for him LOL |