0

I'm trying to figure out why my prepared statement, whose ? count and array values look correct can't seem to actually insert into the table?

The Key/Position listing is truncated, but for some reason the values are binding as empty strings or null...

$sth->debugDumpParams();

SQL: [152] INSERT INTO tablename (a,b,c) VALUES (?,?,?)
Params:  10
Key: Position #0:
paramno=0
name=[0] ""
is_param=1
param_type=2
.
.
.
  • The array I am trying to insert in $sth->execute($obj); looks correct in a print_r after that statement.
  • Is there a way to deeper debug why this did not yield an error or actually insert?
Your Common Sense
  • 154,967
  • 38
  • 205
  • 325
ina
  • 18,561
  • 37
  • 117
  • 197

1 Answers1

-1

$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

ina
  • 18,561
  • 37
  • 117
  • 197