Answer the question
In order to leave comments, you need to log in
Why does the value in the table not change when mysql_query is true?
$conn returns true and the value in the table does not change.
How is this possible?
$arr[0] is 1
$conn = mysql_query("UPDATE `a_characteristik` SET `description` = 'fffffff' WHERE `a_characteristik`.`id` = '".$arr[0]."' ");
if($conn){
echo "tru";
}
else {
echo "fls";
}
Answer the question
In order to leave comments, you need to log in
Well, for starters, you should open the documentation and read. Especially the highlighted block at the very beginning.
php.net/manual/ru/function.mysql-query.php
Second, I don't see $mysqli->error.
Third, why is the query variable called $conn ?
Maybe you just forgot to establish a connection to the database and immediately make a request?
Fourth, errors, logs, debug?
How did you understand that $arr[0] = 1. (where debug/trace)
With connection to the database everything is fine.
$arr[0] we get from json. It's kind of like a string. Maybe this is the problem?
print mysql_affected_rows(); returns 0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question