如何在查看当前发布的PHP MYSQL时显示来自同一类别的其他帖子的链接

Im having trouble with an mySQL Query .What i need is a query that will display on the same page where im viewing a post a list of links to posts in the same category on the side of the page.Im almost finished a music site similar to youtube where users can listen to a track and see a list of tracks beside the post that are in the same category. Any Information Ive found on this is just related to Wordpress pluggins which im not using. My Database Tables are

        Table_categories
           cat_id
           cat_name 

        Table - Mixes
           mix_id
           mix_subject
           mix_description
           mix_date
           mix_cat -- mix_cat is the foreign key for categories.cat_id

The cat_id of Categories is linked to the foreign key mix_cat in table Mixes.I Know it has something to do with ?id= number of the id in one of the table,s Cheers guys Thanks for your help Trevor

You could try something like

Select * from Table_Mixes where id={insert id here, don`t forget to force the int type to avoid SQL Injection}

Get the row and now you have a $mix object with a mix_cat property (or $mix['mix_cat'], if you get it as an array).

Now you just

select * from Table_Mixes where mix_cat={insert $mix->mix_cat here} order_by {whatever} limit {how many links?}

and build the links.