I am having success reading from 4D using PDO, but not writing to it.
When I try to Insert values into the database I get the following error:
SQLSTATE[HY000]: General error: 1248 Failed to execute statement.
Here is my code:
<?php
$dsn = 'dsn-info';
$user = 'user-info';
$pswd = 'password';
$db = new PDO($dsn, $user, $pswd);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Display PDO errors
$statement = $db->prepare("INSERT INTO order(dealer, customer) VALUES(:dealer, :customer)");
$statement->execute(array(
"dealer" => "Test Dealer",
"customer" => "Test Customer"
));
?>
Just trying to figure out whether there is something wrong with my INSERT statement or if something needs to be altered on the 4D side of things to give me writing permission.