Hello the same issue has troubled me in the past.
I have a autocomplete script that the user chooses people to send them something.
I use to store multiple values in one row. That is the id of the selected people that the user chooses.
Thats not the proper thing to do and i changed it.
I have created another table that stores each value with the same id.
It depends upon the table definition. If a_id is unique, then you need to alter the table structure so that a_id is no longer unique and the primary key is composed of a_id and to_user_id. Then, you can have multiple rows to the same a_id, but each a_id can only have one copy of to_user_id. SQL does not deal well with multiple values like you want unless you do this, or create a secondary table that is linked (joined) to the first one via a_id, and the first table has no to_user_id. Unless your table has other data associated with a_id (such as name, address, whatever), then the first suggestion I made would be optimal. If it does have such info, then my second suggestion would be appropriate.