Forum Moderators: coopster

Message Too Old, No Replies

Filling my SQL database with info from HTML source code?

         

Twixly

1:15 pm on Jan 14, 2005 (gmt 0)

10+ Year Member



Hi!

I am desperatly browsing around trying to find some way to add data to mySQL from raw HTML sourcecode.

I basicly have HTML pages showing lots of info on work, and I want to take that info - add it to mySQL so I can sort, select and browse the information in a better way.

Hope someone knows what I mean..
(many online textbased games have this on various fan pages for calculating purposes, ie. Earth2025 and Utopia)

syber

1:22 pm on Jan 14, 2005 (gmt 0)

10+ Year Member



If mySQL can import from delimited data, then all you have to do is copy the HTML to the clipboard and "paste special" into excel - selecting the HTML option. This should give you a spreadsheet with rows and columns that you can save as comma delimited or tab delimited.

Art

Twixly

1:34 pm on Jan 14, 2005 (gmt 0)

10+ Year Member



does that mean there´s a way to import excel-file into mySQL in an easy way?

Been a while since I did all this, and never done that at all.

syber

1:44 pm on Jan 14, 2005 (gmt 0)

10+ Year Member



mySQL should have the ability to import csv or delimited text files. My experience is with SQL Server, so I can't help you there.

Art

Twixly

1:50 pm on Jan 14, 2005 (gmt 0)

10+ Year Member



Ah, found it!

fgetcsv()

what defines a CSV file then? is it a given file extension or is it just a any type of formated file, like .xls?

syber

2:11 pm on Jan 14, 2005 (gmt 0)

10+ Year Member



CSV is the extension you Save As from Excel. It stands for Comma Separated Values.

Art