palani83 Posted September 8, 2010 Share Posted September 8, 2010 hi,i am new to php.i want the sample code for how to read excel file and update the value in to mysql database table.pls help me....ex: name , phone_number and city. Link to comment Share on other sites More sharing options...
palani83 Posted September 8, 2010 Author Share Posted September 8, 2010 hi, i am new to php. please help me to how to import excel file in to mysql database table. Link to comment Share on other sites More sharing options...
wirehopper Posted September 8, 2010 Share Posted September 8, 2010 You can use LOAD DATA with a .csv filehttp://dev.mysql.com/doc/refman/5.1/en/load-data.html Link to comment Share on other sites More sharing options...
palani83 Posted September 8, 2010 Author Share Posted September 8, 2010 You can use LOAD DATA with a .csv filehttp://dev.mysql.com/doc/refman/5.1/en/load-data.html No. i want to use the php code to import the excel file to mysql database table......pls help me........ Link to comment Share on other sites More sharing options...
thescientist Posted September 8, 2010 Share Posted September 8, 2010 No. i want to use the php code to import the excel file to mysql database table......pls help me........right, but you're going to need to use a language to construct the query...You use PHP (as that's what you say you're using) to make the requests (in SQL syntax) to the DB. Link to comment Share on other sites More sharing options...
justsomeguy Posted September 8, 2010 Share Posted September 8, 2010 If you're talking about an XLS file, there are classes people have made to read those:http://www.google.com/search?client=opera&...-8&oe=utf-8If you're talking about a CSV file, once the file is uploaded you can use fopen and then fgetcsv to read the data from it.http://www.php.net/manual/en/function.fgetcsv.php Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.