I get this error when i'm executing my code. I know this has been discussed a several times here but i couldn't solve my problem by reading the solutions provided there.
This is the error i get: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2031
This is my code:
function insertMarker(){
$lat = $_POST['lat'];
$long = $_POST['long'];
$street = $_POST['street'];
$city = $_POST['city'];
$zip = $_POST['zip'];
echo ("$lat, $long, $street, $city, $zip");
global $dbconnect;
$query = $dbconnect->query("INSERT INTO address (latitude, longitude, street, city, zip) VALUES (?,?,?,?,?)");
$query->bindParam(1, $lat);
$query->bindParam(2, $long);
$query->bindParam(3, $street);
$query->bindParam(4, $city);
$query->bindParam(5, $zip);
$query->execute();
//$query->execute(array(":lat"=>$lat, ":long"=>$long,":street"=>$street,":city"=>$city,":zip"=>$zip));
}