I’m creating an insert statement like the following
$stmt = $connection->prepare("INSERT INTO table (first, second, ...) VALUES (?, ?, ...)");
$stmt->bind_param("ss...", $first, $second, ...);
How can I get the filled out query? E.g.
INSERT INTO table (first, second, ...) VALUES ('one','two', ....)
unfortunately you don’t.
As I understand it these are assigned lazily and readied for the next execution of the query.
If you need to test in our db client then vardump the quer and the parameters.
Can I sugeest you look at using PDO and consider using bindValue over bindParam if you don’t need to execute the query repeatedly.