chiprivers Posted September 10, 2010 Share Posted September 10, 2010 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 More sharing options...
PFMaBiSmAd Posted September 10, 2010 Share Posted September 10, 2010 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. Link to comment https://forums.phpfreaks.com/topic/213093-display-query-just-submitted-by-mysqli/#findComment-1109782 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.