Strange error with php and sql

I am trying to update some mysql tables with a form but php has this error
but as I see this statement run without errors at netbeans sql editor, what is wrong?

Invalid insert query1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '…

$sqlperson_info = "update person set "
. "last_name=’ " . $last_name . “’ ,”
. "person_id=’ " . $person_id . "’ , "
. “first_name = ’ " . $first_name . " ',”
. "address=’ " . $address . “’ ,”
. "zip=’ " . $zip . “’ ,”
. "community=’ " . $community . “’ ,”
. "arm=’ " . $afm . “’ ,”
. “blood_type=’ " . $blood . “'”
. " where car_id='” . $_SESSION[‘car_id’] . “';”;
if (!$insertQuery) {
die('Invalid insert query1: ’ . mysql_error());
}

You haven’t given us the full PHP or SQL. What do you do with $sqlperson_info having set it? And where does $insertQuery come from?

I find the sql statement that has the error

update car_info set brand=‘’, brand_subname’‘, type=’‘, tax_power=‘0’, kyvika=’’
where car_id=‘v7cZlsMl1Q6eeDDLdFmv’;

Edit: I find there is a typo a ‘=’ is missing

You need to be aware that the mysql_* functions were removed in PHP version 7. You should now be using either the mysqli_* extension (noite the i in there) or PDO.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.