I have the following code:
$sql = "SELECT...";
$stmt = $db->prepare($sql);
$stmt->bind_param("<types>", $params...);
$stmt->execute();
$resultSet = $stmt->get_result();
My question is how exactly I can see the query that is being actually executed?
If I execute this query directly (without the bindings) via MySQL client, it works great. But in this piece of code something goes wrong and I am trying to understand what.
Types and params in $stmt->bind_param() seem to be correct but it returns an empty result set.
Somebody?