in reply to INSERT into SQL 2000

Paul DuBois uses MySQL where INSERT INTO tablename SET fieldname=value is allowed, I'm not sure this is so for SQL 2000.
However, in the first case, you are calling the sub with 2 parameters here
insert_item ($dbh, param ("content"));
but the sub is written for 3, although none are initialised. I think your mistake is here
# my ($dbh, $t, $content); NOT THIS my ($dbh, $t, $content) = @_; #
In the second piece of code, I would temporarily change this line as follows, and display $rows in the page
#$rows = $dbh->do ($stmt, undef, @placeholder); $rows = qq[ dbh->do ($stmt, undef, @placeholder) ];
If all the values are "" then $stmt would be INSERT INTO prodreg SET which would be invalid.
poj

Replies are listed 'Best First'.
Re: Re: INSERT into SQL 2000
by SyN/AcK (Scribe) on Jul 15, 2003 at 19:05 UTC
    Thing is, even if its valid, it shouldn't be needed for SQL. You should just be able to put INSERT INTO Tablename value, value, value, ....