I have a field with enums: 'preview','active','closed'
When I query like this:
$query = "UPDATE albums
SET album_active = preview
WHERE album_id = 3";
$result = mysql_query($query);
if (!$result) die('Invalid query: ' . mysql_error());
I get : Invalid query: Unknown column 'preview' in 'field list
other query:
$query = sprintf("UPDATE albums SET
album_active = %s
WHERE album_id = %d",
$_POST['album_active'],
$_POST['album_id']
);