Based on the information in the article you linked to this should work:
update giveaways set winner="1"
where Id = (select Id from (select max(Id) as id from giveaways) as t)
More Related Contents:
- What is better subquery vs literal on IN clause in mysql
- Recreating a query using INNER JOIN? [duplicate]
- Getting the SUM() of claps and at the same time counting bookmarks in one query
- MySQL Error 1093 – Can’t specify target table for update in FROM clause
- SQL query return data from multiple tables
- quick selection of a random row from a large table in mysql
- MySQL SELECT only not null values
- Ordering by specific field value first
- MySQL DELETE FROM with subquery as condition
- SELECT / GROUP BY – segments of time (10 seconds, 30 seconds, etc)
- Subqueries with EXISTS vs IN – MySQL
- How to delete from select in MySQL?
- Checking multiple columns for one value
- SQL DELETE with JOIN another table for WHERE condition
- MySQL How do you INSERT INTO a table with a SELECT subquery returning multiple rows?
- MySQL INSERT INTO … VALUES and SELECT
- MySQL error 1241: Operand should contain 1 column(s)
- How to select one row randomly taking into account a weight?
- quick selection of a random row from a large table in mysql
- Compare only day and month with date field in mysql
- Syntax error when using except in a query
- SELECT query return 1 row from each group
- MySQL INNER JOIN select only one row from second table
- MySQL Select Query – Get only first 10 characters of a value
- SQL query to check if a name begins and ends with a vowel
- How to SELECT by MAX(date)?
- SQL UPDATE with sub-query that references the same table in MySQL
- Select from same table as an Insert or Update
- Deleting a row based on the max value
- Insert and set value with max()+1 problems