Need php script for insert data in mysql from text file
I need a script which will read data from text file and insert it into mysql database.Please help me if you know the solution.here i attached my text file.
You can search for "csv to sql" on Google, there are a lot of scripts and online tools.
Hey Falko, tysm for all your ispconfig work :) . I recently got it working for my RHEL 6.3 server with your CentOS instructions. You are my hero!
if your server has phpmyadmin, that is one way enter it. With that text file though, you do not give enough information for anyone to enter it into a mysql table. They would need the table name and the fields names. One way you could easily do it yourself, is to cut and paste the insert information into that text file. Then sign into mysql at the command prompt, go to that data base and simply cut and paste the inserts. Here is the general format:
insert into [TABLENAME] ('[FIELDNAME1]', [FIELDNAME2], ect...)
values ('[FIELDDATA1]','[FIELDDATA2]', ect...);
so it would look something like
insert into customertable (cusid, cusname, cusaddress) values ('0', 'Joe', '123 Here St');
the semi colon at the end is needed for every insert. Good luck :)
|All times are GMT +2. The time now is 01:57.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.