tags:

views:

66

answers:

1

I have the following code for inserting new row into the database:

$query = "INSERT INTO files_requests VALUES (NULL, ?, ?, ?, ?, ?, ?, {$userinfo['id']}, 0, ". time() .", 0)";
    $stmt = $mysqli->prepare($query);
    $stmt->bind_param('isssss', $listID, $files, $filesize, $audio, $subtitles, $fansub);
    $stmt->execute();

Is there a way to see the query after the bind_param is done? I know I can use echo to view and see the variables: echo "('isssss', $listID, $files, $filesize, $audio, $subtitles, $fansub)"; , I would like to view the query itself with the variables inside it. Is there any function I can run on the stmt object or mysqli, to display the query before it is executed, beside create an echo statement myself?

A: 

Sorry, it's not possible, and this has been discussed here before a few times, check it out:

karim79
You could probably extend the MySQLi Class and add it in. But that's probably a bad idea too.
Chacha102