mysql update enums
Posted
by FFish
on Stack Overflow
See other posts from Stack Overflow
or by FFish
Published on 2010-03-27T14:46:36Z
Indexed on
2010/03/27
14:53 UTC
Read the original article
Hit count: 195
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
© Stack Overflow or respective owner