I am using php and mysql to insert and select data from database. Yesterday I figured out a new 'error' which is: I am using the same query twice on the site -- the same query -- and different result
And of course I don't understand why the result is different. Even the numbers of rows are different. Just to help you imagine my error there is a similar query I am using:
$Query = $conn->query("SELECT * FROM `table` WHERE(ID='$id' AND isDeleted = FALSE) ORDER BY Date DESC");
$numRows = $Query->num_rows;
And the value of $numRows is sometimes greater than 0, sometimes 0. After reloading the page these values are the same or not. I mean... Once I reload the page, it seems correct but after that when I reload the page again, the error occurs again (or not).
This site is used to insert data too with method - ajax to php. For inserting data I am using $conn->prepare(); and $conn->execute();
Thank you for the help!