I'm upgrading some old legacy mysql scripts and upgrading to mysqli.
I have a table with editable form fields in each cell and passing those variables (onBlur) via AJAX to the following page:
$stmt = mysqli_prepare($conn, "UPDATE CONTACTS SET ? = ? WHERE CONTACTID = ? LIMIT 1");
mysqli_stmt_bind_param($stmt , "ssi", $_GET['column'], $_GET['editval'], $_GET['id']);
mysqli_stmt_execute($stmt);
After reading up, I find you can't bind a parameter to define a column within the statement so this gives me a problem.
How do I use AJAX $_GET variables to identify which column needs updating? I don't particularly want to have to write individual AJAX scripts for each column.