How Do I See The Final Text Of A Query Resulting From A Call To mysqli->prepare?
- by Joshua
After code like this:
$stmt = $mysqli->prepare("SELECT District FROM City WHERE Name=?")) {
$stmt->bind_param("s", $city);
$stmt->execute();
$stmt->bind_result($district);
$stmt->fetch();
printf("%s is in district %s\n", $city, $district);
How Do I See The Actual SQL Statement That Was Executed?
(It Should Look Something Like…