
August 26th, 2000, 03:57 PM
|
|
Contributing User
|
|
Join Date: Jul 2000
Posts: 441
Time spent in forums: 22 h 59 m 38 sec
Reputation Power: 9
|
|
|
Take a look at this code:
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
$id = "";
$server = "123.456.789:111";
$block = "";
$dbh = DBI->connect("DBI:mysql:gnutella", 'root', 'hn0fstfu') or die "crap1";
$insert_handle = $dbh->prepare_cached('INSERT INTO servers VALUES (?,?)') or die "crap2";
$insert_handle->execute(auto_increment, $server, $block) or die "crap3";
$insert_handle->finish;
$dbh->disconnect;
[/code]
When I run it I get an error that says execute called with 3 bind variables when 2 are needed. The first column of my table has an auto-incrementing integer, the second is a no-null varchar, and the third is a yes-null varchar.
Can someone explain how to fix this error?
[This message has been edited by scream (edited August 26, 2000).]
|