3

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?

lavinio
  • 23,931
  • 5
  • 55
  • 71
user58670
  • 1,438
  • 17
  • 17

0 Answers0