Whenever I try to use mysqli_stmt_bind_param to use a variable as a column name in a SET operation, it seemingly fails. Am I doing something wrong or am I misunderstanding something?
$connection = mysqli_connect('localhost', 'username', '******', 'db');
$query = "UPDATE stock SET ? = '4' WHERE storeID = 1";
$stmt = mysqli_prepare($connection, $query);
mysqli_stmt_bind_param($stmt, "s", $shirtSize);
$shirtSize = "whiteSmall";
mysqli_stmt_execute($stmt);
mysqli_stmt_close($stmt);
mysqli_close($connection);