I have a very simple php file with this code:
$sql = "UPDATE recent_users_chatted_with SET was_viewed = '1' WHERE user_one_id = '5' AND user_two_id = '7'";
if (!$mysqli_query($con,$sql)){
echo '<script type="text/javascript">alert("mysql error:'.mysqli_error($con).'");</script>';
}
I tried running the query in sql manager, and it worked. When I run the php file and this code is enabled, the php file doesn't output ANYTHING, including the error and the other echo statements. How can I find out what is wrong with my statement? All my other sql queries on the page work fine, and I can't seem to find out anything wrong with this one. Thank you very much for your help! Note: I already tried other error-handling methods like "Die()"
source https://stackoverflow.com/questions/67909610/mysqli-error-not-returning-anything-in-fact-it-makes-the-entire-php-file-not-wo
No comments:
Post a Comment