MySQL update, skip blank fields with PDO
问题 I would like to update a MySQL row via the form below. The form works great as is but, if I leave a field blank, it changes the field in MySQL to blank as well. I would like to update the sql but skip over any fields that are blank. I have read a few ways of doing this but they didn't seem logical. I.e. using if statements in the sql string itself. (Having MySQL do the work that should be done in PHP). if($_SERVER['REQUEST_METHOD'] != 'POST') { echo '<form method="post" action=""> ID: <input