August 26th, 2000, 03:57 PM
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";
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).]
August 26th, 2000, 04:13 PM
I figured it out. I needed to add one more question mark!