DBD::mysql::st execute failed: called with 1 bind variables when 0 are needed at /cgi-bin/insert.pl line 44. #### my $street = "http://www.streetmap.co.uk/streetmap.dll?postcode2map?$zip&$zip"; #server vars and connection to the server my $server = 'localhost'; my $db = 'somedb'; my $username= 'someusr'; my $password= 'somepass'; my $dbh =DBI->connect("dbi:mysql:$db:$server", $username, $password,{RaiseError =>1}); #SQL statement my $SQL1 = "INSERT INTO property (address_1, address_2, county, city, zip, description, status, bedroom, map) VALUES ('$address_1', '$address_2', '$county', '$city', '$zip', '$description', '$status','$bedroom',?)"; my $SQL2 = "INSERT INTO picture (property_id,url) VALUES ('property_id'='pic_id','$file')"; #Prepare/execute and disconnect from db foreach my $sql ($SQL1,$SQL2) { my $sth = $dbh->prepare($sql) or die $dbh->errstr; $sth->execute($street) or die $dbh->errstr; } $dbh->disconnect;