I want to update mysql database, where directory = 0, and just update 5 of records which value 0 to art.
directory = 0
5 of records
0
art
for explain:
your syntax is fine.
i will add an order by clause (to be sure)
ORDER BY `Id`
to query
UPDATE articles SET directory = 'art' WHERE directory ='0' ORDER BY id LIMIT 5