From: Peter Szinek Date: 2006-11-20T02:28:48+09:00 Subject: Re: Ruby screen scraping Chris Gallagher wrote: > wow, thanks for that code. Welcome :-) > One question though. Does the name of the field in the table which the > scraped information is going to be inserted into need to be specified in > the code? Or is it already and i'm missing something here? > My code assumed that the table has one column (e.g. 'url' in this case) and the values were inserted into that column. Otherwise if you have more columns, you can do this: INSERT INTO people (name, age) VALUES('Peter Szinek', '23' ). You can do INSERT INTO people VALUES('Peter Szinek', '23' ) as well, but in this case you have to be sure that the columns in your DB are in the same order as in your insert query. In the first example you don't have to care about the column ordering in the DB, as far as the mapping between the column names (first pair of parens) and the values (second pair of parens) are O.K. HTH, Peter __ http://www.rubyrailways.com