Answers for "php pdo prepared statement using unbounded value"

PHP
0

php pdo prepared statement using unbounded value

<?php

$pdo = require 'connect.php';
//using passholder position
$sql = 'insert into authors(first_name, last_name)
        values(?,?)';

$statement = $pdo->prepare($sql);

$statement->execute(['Sandra', 'Aamodt']);
Code language: HTML, XML (xml)

// using named parameters
$sql = 'insert into authors(first_name, last_name)
        values(:first_name,:last_name)';
$statement = $pdo->prepare($sql);
$statement->execute([
	'first_name' => 'Henry',
	'last_name' => 'Aaron'
]);
Posted by: Guest on October-30-2021

Code answers related to "php pdo prepared statement using unbounded value"

Browse Popular Code Answers by Language