If you are sucking the scores off someones website, so you can put them into
a database (you should first get permission from site owner ;) )
But the process would be as follows in pseudo code (can't be done with just
SQL commands, btw.)
Get page
Find beginning and end of table, strip off everything before and after.
Find each row
within each row find each set of <td></td> tags and put information
between into a variable or reference
Repeat for each row, storing your column data into an array or something.
When done,
Loop through result array and build SQL INSERT string
Execute SQL statement
That's the code.
It is going to require heavy use of regualr expressions and backreferences
inside those expressions.
Now, you just have to choose a programming language with powerful regex
capability (see Perl or PHP, PHP easier to learn for novice probably)
On 4/8/01 4:30 PM, "Scott VanCaster" <[EMAIL PROTECTED]> wrote:
> How would one go about getting each element from an HTML table to a
> database? The HTML will be the source code from a games site score report
> pasted into a form. I'm just learning, so don't waste you're valuable time
> explaining every detail of how this can be done, but if someone can point me
> in the right direction or a web site detailing something similar it would be
> appreciated. I can come back here with more specific questions once I've
> learned enough to know what to ask and understand the answers :)
>
> Thanks.
>
>
--
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]