I am creating a news feed and am trying to allow three news updates (per person) at a time.
The structure of the MYSQL db is as follows:
username|update1|update2|update3
bill foo bar baz
I am wondering how I can make it so that when bill posts a new news update:
- the value of
update3
would be removed - the value from
update2
would be moved toupdate3
- the value from
update1
would be moved toupdate2
- and the new news update would be placed at
update1
Would this be possible in simply a MYSQL query or would I have to use PHP to do this?