S
S
supercoder6662020-05-28 20:13:27
MySQL
supercoder666, 2020-05-28 20:13:27

How to display ALL data from a MySQL table with a specific ID?

Hello! I have a db which has a list of news items written by users. What needs to be done to display ALL records, but only with a specific ID?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2020-05-28
@firedragon

Won't leave the primary key in any table unique, so only 1 entry

R
runapa, 2020-05-28
@runapa

Make an additional user_id field in the news table and link the news to it. Then, respectively, you can easily get all the news with a certain user_id.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question