MySQL - 每个类别都有一个单独的id

My table looks like this: enter image description here

So in PHP I have the following:

$result = db_query("SELECT * FROM siteData WHERE category = '$temp_cat' ORDER BY id DESC LIMIT $offset, $rowsperpage");
// db_query() is a custom function which executes mysqli queries to the db

I'm displaying the id in my post HTML and use it as a permalink to the post. That's all good, but when I decide to filter by category I see the following:

Main page:

-Post Title-

-2- <-- Post ID

-Post Content-

-Post Footer-


-Post Title-

-1- <-- Post ID

-Post Content-

-Post Footer-

About Page:

-Post Title-

-4- <-- Post ID

-Post Content-

-Post Footer-


-Post Title-

-3- <-- Post ID

-Post Content-

-Post Footer-

And so on... What I mean with this is that posts have misleading IDs that are set upon post creation and automatically increase. This leads to About Page beginning with post that has id = 3 and not id = 1. Is there any possible way to make it count IDs for different categories separately?

As per discussion, this is what I have in my select.php file:

<?php
    while ($row = mysqli_fetch_array($result)) {
        $id = $row['id'];
        $title = $row['title'];
        $category = $row['category'];
        $date = $row['date'];
?>
        Category: &#8220;<?php echo $category; ?>&#8221;
        &#160;<span class="fa fa-fw fa-lg fa-chevron-right" aria-hidden="true"></span>&#160;
        Title: <a href="edit.php?id=<?php echo $id; ?>" hreflang="en">&#8220;<?php echo $title ?>&#8221;</a>
        &#160;<span class="fa fa-fw fa-lg fa-chevron-right" aria-hidden="true"></span>&#160;
        Date: <time datetime="<?php echo $date; ?>"><?php echo $date; ?></time><br>
<?php
    }
?>

I then SELECT the post by the id which I $_GET from the URI and display some form-specific elements that hold the post values. Then I update the data in the db.