RE: [PHP] HTML table to MySQL table conversion

2001-09-27 Thread Maxim Maletsky \(PHPBeginner.com\)

Uff..  Don't envy you...

Anyway, if someone (hopefully) was cutingpasting the cells in you could
do a combination of fopen/explode/regex to split the data into
coma-separated values. For example, stripping out every HTML tag
replacing it with a coma and a space will create you a dump file.

Also, you could try using MS Excel or Access, if mr. Magic Microsoft
Excel allows you to import data from an HTML table you could then export
it from there as comma separated values and prepare yourself a dump file
this way.

There are ways, man. But be careful not to take more efforts for PHP
solution that what it would be getting an intern guy/girl pasting the
staff :-)


Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: RNie [mailto:[EMAIL PROTECTED]] 
Sent: giovedì 27 settembre 2001 12.53
To: [EMAIL PROTECTED]
Subject: [PHP] HTML table to MySQL table conversion


Hello there,

Anyone has done this before? Would like to see some sample code to build
a converter from HTML table to a MySql table. Someone put an enourmous
amount of data in HTML tables and now we would like to put it in MySQL
database. We would not like to do this manually.

Thank you!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] HTML table to MySQL table conversion

2001-09-27 Thread RNie

Well I don't have Access, nor Excel, but there is the Freeware Staroffice
that did it for me. Thank's for the tip. I thought of this myself, but your
message encouraged me to try it and it works.

Method I used:
- Open HTML with Staroffice
- Delete irregular header fields
- Select the whole table and  copy it
- Open a new spreadsheet
- Paste the table in the spreadsheet
- Save it as a comma delimited file.
- Create a table with for instance phpMyAdmin according to the data in the
HTML table
- import it into this new table with phpMyAdmin's utility called Insert
textfiles into table You have to take care here that you put the same field
delimiter as is used in your file.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]