I'm creating a simple app to learn some PHP and SQL. To fetch each user's posts, I am using a key called post_id
which auto increments and is also the primary/unique key. At the moment I get every post with this post_id
. If a user were to open up the DOM, they would be able see only their post ID's (no on else's), like so:
<ul>
<li data-id="173">My first post!</li>
<li data-id="174">My second post!</li>
<li data-id="175">My third post!</li>
</ul>
Is it a problem that these data-id's could potentially get very large, very quickly? Is it worth me trying to reformat the database, so each user will get their own set of much smaller IDs:
<ul>
<li data-id="4">My first post!</li>
<li data-id="5">My second post!</li>
<li data-id="6">My third post!</li>
</ul>
The benefit of this I assume means they will be less revealing if someone looks at the source, and perhaps easier for me to code in the long run?
Or is this simply a non-issue? I've never done something like this so any guidance would be much appreciated.