php - PDO Insert SQL not executing with no errors -
i running code:
$stmt = $pdo_conn->prepare("insert ticket_updates (ticketnumber, notes, datetime, contact_name, contact_email, customer, internal_message, type) values (:ticketnumber, :notes, :datetime, :contact_name, :contact_email, :customer, :internal_message, :type) "); $stmt->execute(array(':ticketnumber' => $ticketnumber, ':notes' => $ticketsummary, ':datetime' => date("y-m-d h:i:s"), ':contact_name' => $ticket_contactname, ':contact_email' => $ticket_contactemail, ':customer' => 'y', ':internal_message' => 'n', ':type' => 'update'));
all table columns exist , correct not getting past point
i tried var_dump($stmt);
nothing
use following verify connection established correctly
try { $dbh = new pdo("mysql:host=xxxxxxxxxxxx;dbname=streaming", "xxxx", "xxxx"); } catch (exception $e) { throw new exception( 'something gone wrong', 0, $e); }
you can output errors when execute
$sth->execute() or die(print_r($sth->errorinfo(), true));
finally may need enable errors on page, place in header of page or @ top if single page:
error_reporting(-1);
the minus 1 means print errors.
until have discovered error hard diagnose issue further, issue falls down either connection database or how have formed parameter array.
Comments
Post a Comment