How to store multiple users in a MySQL table row
<p>What I have is a program that allows users to monitor posts by specifying what they are looking for. I'm predicting that many users will monitor the same posts, and would like to instead of having them all listed as separate posts, have all of the users grouped into the same row.</p>

<p>I'm unsure of wether MySQL has a way to point to multiple users in a different table, or some other way of doing it. I've seen things such as joining mentioned, but have not seen any ways to implement it in the way that I would like.</p>

<p>What i'm wondering if it's possible to do:</p>

<pre><code>Table 1:                                        Table 2:

Platform   Post Name          Users             Users
-----------------------------------             ----------------
PC         Title              [   ] ----------&gt; Jane
                                          |---&gt; Bob 
                                          |---&gt; Roger
</code></pre>

<p>Is it possible to do this, or what way should I be going about this?</p>

<p>Putting user names in a comma-separated list is a <em>terrible</em> solution.  Please don't do that.  It leads to all sorts of problems.</p>

<p>The best way to do this is to create a new table with two columns: <code>USER_ID</code> and <code>POST_ID</code>.  Whenever a user wants to monitor a post, add a row with the user's ID and the post's ID.</p>

python mysql