Jump to content

display query just submitted by mysqli


chiprivers

Recommended Posts

Is it possible to echo the query just submitted using mysqli->execute();

 

I am having trouble with a prepared statement which I know is working fine because I can copy and paste it straight in, replacing the ? with the required values and it works.  I have echoed the $variables in my php script to ensure they are correct before carrying out the execute() but I am getting no rows returned.

 

I am just wondering if there is a method for returning the complete query as it was run to ensure it is correct?

Link to comment
https://forums.phpfreaks.com/topic/213093-display-query-just-submitted-by-mysqli/
Share on other sites

Are you testing the value (TRUE/FALSE) that $stmt->execute(); returns so that you know if the query is being executed or is producing an error?

 

You can also use $stmt->error to find out what error is occurring.

 

Beyond that it would take seeing your code to be able to help you.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.