php - SQL statement update record not working -
this sql statement works in phpmyadmin not on website:
$sql = mysqli_query($con, "update details inner join date on date.dateid = details.dateid set details.year = '$year', details.description = '$description', details.dateid = '$decade' id='$recordid';") or die('query error. try again: '.mysqli_error());
although sql statement works when replace with:
$sql = mysqli_query($con, "update details set year = '$year', description = '$description' id='$recordid'") or die('query error. try again: '.mysqli_error());
what happening here? why first code not updating record?
the url receiving new values isn't updating database.
although can update multiple tables in 1 update
query, using inner join
not correct syntax. need update 1 table details
, don't need inner join date on date.dateid = details.dateid
Comments
Post a Comment