hewstone999 Posted January 26, 2009 Share Posted January 26, 2009 I have a html table that contains data and i want to insert the data into an Access database. Any ideas how to do this? Table1: 01, Rich, Mike, 23, fred lane, 02, James, milner, 45, School Lane, 03, Rob, Matthews, 89, College Road, I connect to the database using this code: $db_conn = new COM("ADODB.Connection"); $connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("./Database1.mdb").";"; $db_conn->open($connstr); Link to comment https://forums.phpfreaks.com/topic/142511-insert-html-table-data-into-a-access-database-or-array/ Share on other sites More sharing options...
phparray Posted January 26, 2009 Share Posted January 26, 2009 Interesting. Most of the time you are creating and html table from data that exists in a database not the other way around. If this is just a one time thing you could copy and paste the html table from your browser window into an excel spread spreadsheet. clean up the data if need be then import it into access. Link to comment https://forums.phpfreaks.com/topic/142511-insert-html-table-data-into-a-access-database-or-array/#findComment-746784 Share on other sites More sharing options...
hewstone999 Posted January 27, 2009 Author Share Posted January 27, 2009 The table is created by a user importing a .txt file and PHP reading the txt and creating a table. Now i want to insert those values into the access database. Is there a way to access each value in the table i.e. Cell(A1) Link to comment https://forums.phpfreaks.com/topic/142511-insert-html-table-data-into-a-access-database-or-array/#findComment-747598 Share on other sites More sharing options...
phparray Posted January 27, 2009 Share Posted January 27, 2009 Your should go directly from the txt file into the mysql db. It was be one heck of a preg_match to do it the other way and very inefficient. Link to comment https://forums.phpfreaks.com/topic/142511-insert-html-table-data-into-a-access-database-or-array/#findComment-748038 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.