Hi everyone!
Ok, let me quickly explain what I want to achieve. I have two tables.
The first table is Requests and it looks like this
+------------------------------+
| Requests |
+----+-------------+-----------+
| id | user_from | user_to |
+----+-------------+-----------+
| | | |
| | | |
| | | |
| | | |
+----+-------------+-----------+
When the request has been sent and the other user has accepted, they get MOVED from the requests table into the friends table, knowing that they now are indeed friends!
And here is my friends table:
+--------------------------------+
| Friends |
+----+-------------+-------------+
| id | user_id | friend_id |
+----+-------------+-------------+
| | | |
| | | |
| | | |
| | | |
+----+-------------+-------------+
Now my question to you is HOW DO I MOVE (once the request is accepted) THE DATA FROM THE REQUESTS TABLE TO THE FRIENDS TABLE???
And how will the query look if I want to perform this?
PLEASE help!!
Thanks a lot!
J