# Adding data to the end of a mySQL field \[PHP\]

**URL:** <https://forum.kirupa.com/t/adding-data-to-the-end-of-a-mysql-field-php/275456>\
**Category:** programming\
**Created:** [November 14, 2008, 1:20am UTC](https://forum.kirupa.com/t/adding-data-to-the-end-of-a-mysql-field-php/275456 "2008-11-14T01:20:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zaxza](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zaxza/32/2227_2.png) [@Zaxza](https://forum.kirupa.com/u/Zaxza)\
**Post date:** [November 14, 2008, 1:20am UTC](https://forum.kirupa.com/t/adding-data-to-the-end-of-a-mysql-field-php/275456/1 "2008-11-14T01:20:18Z")

</div>

Hi there, and thank you for you time.

I’m currently learning OOP with php. I have a ‘user’ mySQL table with ‘id’, ‘username’, and ‘savedItems’ as well as a ‘items’ mySQL table with ‘id’, ‘title’, etc…

I want to be able to add numerous item ids to the ‘savedItems’ field in my user table so that later i can seperate them using split().

Say i have 2 ids already in that field (25,48) how can i add another one to the end (25,48,31)?  
I understand i would use ‘UPDATE’ but all I know how to do is update the entire field.

Should i echo the field origionally and add the new info to the end then update it or is there a better more efficient way of doing it.

I’m sorry if i’m explaining this poorly it’s very late here and i’m tired. Any help wold be greatly appreciated.

Cheers.
